瀏覽代碼

Merge remote-tracking branch 'origin/feature/v4.9.21' into feature/v4.9.21

duxin 1 年之前
父節點
當前提交
26bd61aa15
共有 46 個文件被更改,包括 1279 次插入543 次删除
  1. 1 1
      src/config.yaml
  2. 11 11
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js
  3. 8 5
      src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_aiForecastPack.html
  4. 8 5
      src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_member.html
  5. 8 5
      src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_subAccount.html
  6. 9 5
      src/jfw/modules/app/src/web/templates/commonPay/bidfile/bidfileDetail.html
  7. 8 5
      src/jfw/modules/app/src/web/templates/commonPay/integral/integralDetail.html
  8. 8 5
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_toOrderDetail.html
  9. 8 5
      src/jfw/modules/app/src/web/templates/entniche/entniche_order_detail.html
  10. 2 1
      src/jfw/modules/app/src/web/templates/invoice/cantInvoice.html
  11. 7 6
      src/jfw/modules/subscribepay/src/config/config.go
  12. 6 1
      src/jfw/modules/subscribepay/src/invoice.json
  13. 24 24
      src/jfw/modules/subscribepay/src/service/invoice.go
  14. 10 3
      src/web/staticres/common-module/order-list/js/order-detail.js
  15. 8 4
      src/web/staticres/common-module/order-list/js/order-list-config.js
  16. 22 10
      src/web/staticres/common-module/order-list/js/order-list.js
  17. 114 0
      src/web/staticres/electronic_invoice/css/check_invoice.css
  18. 98 1
      src/web/staticres/electronic_invoice/css/invoice.css
  19. 166 166
      src/web/staticres/electronic_invoice/js/invoice.js
  20. 2 2
      src/web/templates/areaPack/pc/page_order.html
  21. 2 2
      src/web/templates/frontRouter/pc/dataFile/sess/orderDetail.html
  22. 2 2
      src/web/templates/order/pc/bidfile/bidfileDetail.html
  23. 2 2
      src/web/templates/order/pc/buyerPortraitPack/detail.html
  24. 2 2
      src/web/templates/order/pc/datareport/detail.html
  25. 1 1
      src/web/templates/order/pc/filePack/detail.html
  26. 1 1
      src/web/templates/order/pc/integral/integralDetail.html
  27. 1 1
      src/web/templates/pc/aiPack_orderDetail.html
  28. 210 34
      src/web/templates/pc/check_invoice.html
  29. 2 2
      src/web/templates/pc/dataPack/packDetail.html
  30. 1 1
      src/web/templates/pc/entniche_orderDetail.html
  31. 437 146
      src/web/templates/pc/invoice.html
  32. 2 2
      src/web/templates/pc/medaratus_orderDetail.html
  33. 3 9
      src/web/templates/pc/member_orderDetail.html
  34. 9 17
      src/web/templates/pc/myOrder.html
  35. 3 7
      src/web/templates/pc/orderDetail.html
  36. 2 2
      src/web/templates/pc/subAccount_orderDetail.html
  37. 2 2
      src/web/templates/pc/vip_orderDetail.html
  38. 8 5
      src/web/templates/weixin/commonPay/bidfile/bidfiledetail.html
  39. 8 5
      src/web/templates/weixin/commonPay/integral/integralDetail.html
  40. 6 3
      src/web/templates/weixin/commonPay/medical/orderDetail.html
  41. 8 5
      src/web/templates/weixin/dataExport/dataExport_toOrderDetail.html
  42. 2 1
      src/web/templates/weixin/invoice/cantInvocie.html
  43. 8 5
      src/web/templates/weixin/member/aiForecastPackdetail.html
  44. 10 7
      src/web/templates/weixin/member/memberdetail.html
  45. 8 5
      src/web/templates/weixin/member/subAccountDetail.html
  46. 11 9
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html

+ 1 - 1
src/config.yaml

@@ -11,5 +11,5 @@ publicserviceKey: "publicservice.rpc"
 
 
 database:
 database:
   default:
   default:
-    link: "clickhouse:jianyu_appl:Cli3#fkh4ouSe@tcp(127.0.0.1:4012)/jyseo_test?dial_timeout=2000ms&max_execution_time=60"
+    link: "clickhouse:jianyu_appl:Cli3#fkh4ouSe@tcp(172.17.16.40:4012)/jyseo_test?dial_timeout=2000ms&max_execution_time=60"
     debug: true
     debug: true

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

@@ -455,12 +455,11 @@ $(function () {
                 }
                 }
 
 
                 // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
                 // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
-                if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
                     var pay_again = ""
                     var pay_again = ""
                     //发票
                     //发票
                     if (r.data.order.applybill_status === 0) {
                     if (r.data.order.applybill_status === 0) {
                         //已支付未申请发票
                         //已支付未申请发票
-                        if(r.data.order.source !== 1){
+                        if(r.data.order.invoice_price && r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
                             pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()' style='width: 100%!important;'>开发票</button>"
                             pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()' style='width: 100%!important;'>开发票</button>"
                             $(".invoice .invoicing").css("display", "");
                             $(".invoice .invoicing").css("display", "");
                             $(".invoicing").on("click", function () {
                             $(".invoicing").on("click", function () {
@@ -479,7 +478,7 @@ $(function () {
                         }
                         }
                     } else {
                     } else {
                         //已支付已申请发票
                         //已支付已申请发票
-                        if(r.data.order.source !== 1){
+                        if(r.data.order.invoice_show){
                         pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice(" + r.data.order.applybill_status + ")' style='width: 100%!important;'>查看发票</button >"
                         pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice(" + r.data.order.applybill_status + ")' style='width: 100%!important;'>查看发票</button >"
                         $(".invoice").css("display", "none");
                         $(".invoice").css("display", "none");
                         }
                         }
@@ -495,10 +494,8 @@ $(function () {
                                 break;
                                 break;
                         }
                         }
                     }
                     }
-                    if(r.data.order.source !== 1){
-                       $(".j-footer").show().html(pay_again)
-                    }
-                }
+                       $(".j-footer").show().html(pay_again)     
+                
             } else if (r.data.order.order_status == -2 || r.data.order.order_status == -3) {
             } else if (r.data.order.order_status == -2 || r.data.order.order_status == -3) {
                 $("#card-header-bg").addClass("bg cancel-bg")
                 $("#card-header-bg").addClass("bg cancel-bg")
                 $("#pageTitle").addClass("status")
                 $("#pageTitle").addClass("status")
@@ -780,7 +777,8 @@ function checkinvoice(flag) {
         });
         });
         return
         return
     }
     }
-    window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode_
+    // window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode_
+    window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode_
 }
 }
 
 
 //开发票
 //开发票
@@ -795,11 +793,13 @@ function invoiceAdd() {
     var orderCode_ = decodeURIComponent(getParam("orderCode"));
     var orderCode_ = decodeURIComponent(getParam("orderCode"));
     $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode_}, function (data) {
     $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode_}, function (data) {
         if (data.status == 1) {
         if (data.status == 1) {
-            window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode_;
+            // window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode_;
+            window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode_;
         } else {
         } else {
-            window.location.href = "/jyapp/front/cantInvoice";
+            // window.location.href = "/jyapp/front/cantInvoice";
+            window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode_;
         }
         }
-        ;
+        
     })
     })
 }
 }
 
 

+ 8 - 5
src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_aiForecastPack.html

@@ -222,10 +222,10 @@
                 if (source === ""){
                 if (source === ""){
                   var pay_again = ""
                   var pay_again = ""
                   //发票
                   //发票
-                  if (r.data.applybill_status === 0 && r.data.source !== 1) {
+                  if (r.data.applybill_status === 0 && r.data.invoice_price) {
                       //已支付未申请发票
                       //已支付未申请发票
                       pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
                       pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
-                  } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                  } else if ( r.data.invoice_show) {
                       //已支付已申请发票
                       //已支付已申请发票
                       pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                       pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                   }
                   }
@@ -364,9 +364,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/jyapp/front/cantInvoice";
+                // window.location.href = "/jyapp/front/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
             ;
             ;
         })
         })
@@ -388,7 +390,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 8 - 5
src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_member.html

@@ -465,10 +465,10 @@
                 if (source === ""&&filterObj.badge!="exchange") {
                 if (source === ""&&filterObj.badge!="exchange") {
                     var pay_again = ""
                     var pay_again = ""
                     //发票
                     //发票
-                    if (r.data.applybill_status === 0 && r.data.source !== 1) {
+                    if (r.data.applybill_status === 0 && r.data.invoice_price) {
                         //已支付未申请发票
                         //已支付未申请发票
                         pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
                         pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
-                    } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                    } else if (r.data.invoice_show) {
                         //已支付已申请发票
                         //已支付已申请发票
                         pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                         pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                     }
                     }
@@ -658,9 +658,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/jyapp/front/cantInvoice";
+                // window.location.href = "/jyapp/front/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
         })
         })
     }
     }
@@ -681,7 +683,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 8 - 5
src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_subAccount.html

@@ -226,10 +226,10 @@
                 if (source === "") {
                 if (source === "") {
                   var pay_again = ""
                   var pay_again = ""
                   //发票
                   //发票
-                  if (r.data.applybill_status === 0 && r.data.source !== 1) {
+                  if (r.data.applybill_status === 0 && r.data.invoice_price) {
                       //已支付未申请发票
                       //已支付未申请发票
                       pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
                       pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
-                  } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2)  && r.data.source !== 1) {
+                  } else if ( r.data.invoice_show) {
                       //已支付已申请发票
                       //已支付已申请发票
                       pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                       pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                   }
                   }
@@ -369,9 +369,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/jyapp/front/cantInvoice";
+                // window.location.href = "/jyapp/front/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
             ;
             ;
         })
         })
@@ -393,7 +395,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 9 - 5
src/jfw/modules/app/src/web/templates/commonPay/bidfile/bidfileDetail.html

@@ -194,10 +194,10 @@
 
 
                 var pay_again = ""
                 var pay_again = ""
                 //发票
                 //发票
-                if (r.data.applybill_status === 0  && r.data.source !== 1) {
+                if (r.data.applybill_status === 0  && r.data.source.invoice_price) {
                     //已支付未申请发票
                     //已支付未申请发票
                     pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
                     pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
-                } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.show_invoice) {
                     //已支付已申请发票
                     //已支付已申请发票
                     pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                     pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                 }
                 }
@@ -343,9 +343,12 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/jyapp/front/cantInvoice";
+                // window.location.href = "/jyapp/front/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
+                
             }
             }
             ;
             ;
         })
         })
@@ -367,7 +370,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 8 - 5
src/jfw/modules/app/src/web/templates/commonPay/integral/integralDetail.html

@@ -196,10 +196,10 @@
 
 
                     var pay_again = ""
                     var pay_again = ""
                     //发票
                     //发票
-                    if (r.data.applybill_status === 0  && r.data.source !== 1) {
+                    if (r.data.applybill_status === 0  && r.data.invoice_price) {
                         //已支付未申请发票
                         //已支付未申请发票
                         pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
                         pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\"; onclick='invoiceAdd()'>开发票</button>"
-                    } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2)  && r.data.source !== 1) {
+                    } else if (r.data.invoice_show) {
                         //已支付已申请发票
                         //已支付已申请发票
                         pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                         pay_again += "<button class=\"j-button-cancel\" style=\"width: 100%!important;height: 0.92rem!important;\" onclick='checkinvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                     }
                     }
@@ -361,9 +361,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/jyapp/front/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
+                // window.location.href = "/jyapp/front/cantInvoice";
             }
             }
             ;
             ;
         })
         })
@@ -385,7 +387,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 8 - 5
src/jfw/modules/app/src/web/templates/dataExport/dataExport_toOrderDetail.html

@@ -695,7 +695,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" +{{.T.o.order_code}}
+        // window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" +{{.T.o.order_code}}
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" +{{.T.o.order_code}}
     }
     }
 
 
     function invoiceAdd() {
     function invoiceAdd() {
@@ -708,9 +709,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code":{{.T.o.order_code}}}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code":{{.T.o.order_code}}}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/jyapp/front/invoice/showpage?order_code=" +{{.T.o.order_code}}
+                // window.location.href = "/jyapp/front/invoice/showpage?order_code=" +{{.T.o.order_code}}
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" +{{.T.o.order_code}}
             } else {
             } else {
-                window.location.href = "/jyapp/front/cantInvoice";
+                // window.location.href = "/jyapp/front/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" +{{.T.o.order_code}}
             }
             }
             ;
             ;
         })
         })
@@ -738,9 +741,9 @@
                                 $(".order-main").before(finish_html)
                                 $(".order-main").before(finish_html)
 
 
                                 var html = '<div class="j-button-group">'
                                 var html = '<div class="j-button-group">'
-                                if (r.data.applybill_status === 0 && r.data.source !== 1) {
+                                if (r.data.applybill_status === 0 && r.data.invoice_price) {
                                     html += '<button class="j-button-cancel" onclick="invoiceAdd()">开发票</button><button class="j-button-confirm" id="buytwo" onclick="payAgain()">再次购买</button>'
                                     html += '<button class="j-button-cancel" onclick="invoiceAdd()">开发票</button><button class="j-button-confirm" id="buytwo" onclick="payAgain()">再次购买</button>'
-                                } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                                } else if ( r.data.invoice_show) {
                                     html += '<button class="j-button-cancel" onclick= checkinvoice(' + r.data.applybill_status+ ')>查看发票</button><button class="j-button-confirm" id="buytwo" onclick="payAgain()">再次购买</button>'
                                     html += '<button class="j-button-cancel" onclick= checkinvoice(' + r.data.applybill_status+ ')>查看发票</button><button class="j-button-confirm" id="buytwo" onclick="payAgain()">再次购买</button>'
                                 }
                                 }
                             } else {
                             } else {

+ 8 - 5
src/jfw/modules/app/src/web/templates/entniche/entniche_order_detail.html

@@ -467,9 +467,9 @@
                     $("#card-header-bg").addClass("bg finish-bg")
                     $("#card-header-bg").addClass("bg finish-bg")
                     $("#pageTitle").addClass("status")
                     $("#pageTitle").addClass("status")
                     $(".order_status").text("已完成");
                     $(".order_status").text("已完成");
-                    if (data.applybill_status === 0 && data.source !== 1) {
+                    if (data.applybill_status === 0 && data.invoice_price) {
                         pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button></div>"
                         pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button></div>"
-                    } else if ((data.applybill_status === 1 || data.applybill_status === 2) && data.source !== 1) {
+                    } else if (data.invoice_show) {
                         pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice(" + data.applybill_status + ")'>查看发票</button></div>"
                         pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice(" + data.applybill_status + ")'>查看发票</button></div>"
                     }
                     }
                     $(".j-footer").html(pay_again)
                     $(".j-footer").html(pay_again)
@@ -565,7 +565,8 @@
             return
             return
         }
         }
         orderCode = decodeURIComponent(getParam("order_code"))
         orderCode = decodeURIComponent(getParam("order_code"))
-        window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     //开发票
     //开发票
@@ -580,9 +581,11 @@
         orderCode = decodeURIComponent(getParam("order_code"))
         orderCode = decodeURIComponent(getParam("order_code"))
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/jyapp/front/cantInvoice";
+                // window.location.href = "/jyapp/front/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
             ;
             ;
         })
         })

+ 2 - 1
src/jfw/modules/app/src/web/templates/invoice/cantInvoice.html

@@ -152,7 +152,8 @@
         }
         }
         checkInvoice.init()
         checkInvoice.init()
         function replaceInvoice(){
         function replaceInvoice(){
-            window.location.href = "/jyapp/front/invoice/showpage?order_code="+order_code+"&c=1"
+            // window.location.href = "/jyapp/front/invoice/showpage?order_code="+order_code+"&c=1"
+            window.location.href = "/jy_mobile/invoice/Invoicing?order_code="+order_code+"&type=Replace"
         }
         }
 
 
     </script>
     </script>

+ 7 - 6
src/jfw/modules/subscribepay/src/config/config.go

@@ -236,12 +236,13 @@ type Invoice struct {
 		Time  string
 		Time  string
 	}
 	}
 	Invoice_switch     bool
 	Invoice_switch     bool
-	Red_invoice_switch bool   //红冲发票是否可用开关
-	Red_invoice_msg    string //提示信息
-	Third_party_switch bool   //第三方开票开关
-	Order_createtime   int64  //24年之前的订单不能开票
-	SigningSubject     string `json:"signing_subject"` //管理后台订单发票签约主体配置
-	SubmitNum          int64  `json:"submit_num"`
+	Red_invoice_switch bool            //红冲发票是否可用开关
+	Red_invoice_msg    string          //提示信息
+	Third_party_switch bool            //第三方开票开关
+	Order_createtime   int64           //24年之前的订单不能开票
+	SigningSubject     string          `json:"signing_subject"` //管理后台订单发票签约主体配置
+	SubmitNum          int64           `json:"submit_num"`
+	Invoice_type       map[string]bool //发票类型
 }
 }
 
 
 type entnicheConfig struct {
 type entnicheConfig struct {

+ 6 - 1
src/jfw/modules/subscribepay/src/invoice.json

@@ -15,5 +15,10 @@
   "third_party_switch": false,
   "third_party_switch": false,
   "order_createtime": 1704038400,
   "order_createtime": 1704038400,
   "submit_num": 3,
   "submit_num": 3,
-  "signing_Subject":"北京剑鱼信息技术有限公司"
+  "signing_Subject":"北京剑鱼信息技术有限公司",
+  "invoice_type": {
+    "电子普通发票": true,
+    "电子专用发票": true,
+    "普通发票(电子发票)": true
+  }
 }
 }

+ 24 - 24
src/jfw/modules/subscribepay/src/service/invoice.go

@@ -1454,37 +1454,37 @@ func (this *Invoice) InvoiceSubmit() {
 		this.ServeJson(NewResult("", errors.New("缺少参数")))
 		this.ServeJson(NewResult("", errors.New("缺少参数")))
 		return
 		return
 	}
 	}
+	if !config.InvoiceConfig.Invoice_type[this.GetString("invoice_variety")] {
+		this.ServeJson(NewResult("", errors.New("发票类型有误")))
+		return
+	}
+	if this.GetString("invoice_type") != "个人" && this.GetString("invoice_type") != "单位" {
+		this.ServeJson(NewResult("", errors.New("发票抬头有误")))
+		return
+	}
 	now := time.Now()
 	now := time.Now()
 	again, _ := this.GetInteger("again")                       //是否是失败重新开票 0 首次提交  1 再此提交
 	again, _ := this.GetInteger("again")                       //是否是失败重新开票 0 首次提交  1 再此提交
 	oldOnlyIdentifying := this.GetString("oldOnlyIdentifying") //最后一次失败的发票信息唯一标识
 	oldOnlyIdentifying := this.GetString("oldOnlyIdentifying") //最后一次失败的发票信息唯一标识
 	data := map[string]interface{}{
 	data := map[string]interface{}{
-		//"order_code":          orderCode,
-		"company_name":    this.GetString("company_name"),
-		"phone":           this.GetString("phone"),
-		"mail":            this.GetString("mail"),
-		"invoice_type":    this.GetString("invoice_type"),
-		"invoice_content": this.GetString("invoiceContent"),
-		"invoice_status":  0,
-		"invoice_changed": 0,
-		//"invoice_order_code":  orderCode,
+		"company_name":      this.GetString("company_name"),
+		"phone":             this.GetString("phone"),
+		"mail":              this.GetString("mail"),
+		"invoice_type":      this.GetString("invoice_type"),
+		"invoice_content":   this.GetString("invoiceContent"),
+		"invoice_status":    0,
+		"invoice_changed":   0,
 		"company_phone":     this.GetString("company_phone"),
 		"company_phone":     this.GetString("company_phone"),
 		"taxpayer_identnum": this.GetString("taxpayer_identnum"),
 		"taxpayer_identnum": this.GetString("taxpayer_identnum"),
 		"create_time":       time.Now().Unix(),
 		"create_time":       time.Now().Unix(),
-		//"user_id":           userId,
-		"operable_time": FormatDate(&now, Date_Full_Layout),
-		//"invoice_money":       payMoney,
-		//"invoice_order_money": payMoney,
-		"invoicing_entity": "北京剑鱼信息技术有限公司",
-		"remark":           this.GetString("remark"),
-		//"source":           0,
-		"invoice_variety": this.GetString("invoice_variety"),
-		"bank_account":    this.GetString("bank_account"),
-		//"only_Identifying":    onlyIdentifying,
-		"company_address":  this.GetString("company_address"),
-		"bank_name":        this.GetString("bank_name"),
-		"recipient":        this.GetString("recipient"),
-		"delivery_address": this.GetString("delivery_address"),
-		//"product_type":        qutil.ObjToString((*orderInfo)["product_type"]),
+		"operable_time":     FormatDate(&now, Date_Full_Layout),
+		"invoicing_entity":  "北京剑鱼信息技术有限公司",
+		"remark":            this.GetString("remark"),
+		"invoice_variety":   this.GetString("invoice_variety"),
+		"bank_account":      this.GetString("bank_account"),
+		"company_address":   this.GetString("company_address"),
+		"bank_name":         this.GetString("bank_name"),
+		"recipient":         this.GetString("recipient"),
+		"delivery_address":  this.GetString("delivery_address"),
 	}
 	}
 	if again == 1 {
 	if again == 1 {
 		err := OpenInvoiceAgain(oldOnlyIdentifying, data)
 		err := OpenInvoiceAgain(oldOnlyIdentifying, data)

+ 10 - 3
src/web/staticres/common-module/order-list/js/order-detail.js

@@ -235,12 +235,17 @@ var vm = new Vue({
 
 
       var filterInfo = JSON.parse(order.filter)
       var filterInfo = JSON.parse(order.filter)
       // 开发票按钮展示逻辑
       // 开发票按钮展示逻辑
-      if ((order.pay_money <= 0)||(filterInfo.canInvoice!=undefined &&!filterInfo.canInvoice)) {
+      if (this.invokeButtonText === '开发票' && (order.pay_money <= 0)||(filterInfo.canInvoice!=undefined &&!filterInfo.canInvoice)) {
         this.orderStateMap[1].bottomButtonShow.invoke = false
         this.orderStateMap[1].bottomButtonShow.invoke = false
       }
       }
-      if(order.source === 1){ // 线下发票隐藏按钮
+      // if(order.source === 1){ // 线下发票隐藏按钮 p537放开此限制
+      //   this.orderStateMap[this.orderInfo.state].bottomButtonShow.invoke = false
+      // }
+      if(this.invokeButtonText === '开发票' && !order.invoice_price){
         this.orderStateMap[this.orderInfo.state].bottomButtonShow.invoke = false
         this.orderStateMap[this.orderInfo.state].bottomButtonShow.invoke = false
 
 
+      }else if (this.invokeButtonText === '查看发票' && !order.invoice_show) {
+        this.orderStateMap[this.orderInfo.state].bottomButtonShow.invoke = false
       }
       }
       this.orderInfo.productInfoList = this.getProductInfoList(info)
       this.orderInfo.productInfoList = this.getProductInfoList(info)
       this.orderInfo.orderInfoList = this.getOrderInfoListList(info)
       this.orderInfo.orderInfoList = this.getOrderInfoListList(info)
@@ -423,7 +428,9 @@ var vm = new Vue({
             }
             }
           } else {
           } else {
             // 不能开发票跳转
             // 不能开发票跳转
-            var href = assetsConf.invokeLink.cantInvoke[platform]
+            // var href = assetsConf.invokeLink.cantInvoke[platform]
+            // p537 调整为取消此不能开发票限制 
+            var href = assetsConf.invokeLink.invoke[platform]
             if (href) {
             if (href) {
               _this.goToLink(`${href}?order_code=${orderCode}`)
               _this.goToLink(`${href}?order_code=${orderCode}`)
             }
             }

+ 8 - 4
src/web/staticres/common-module/order-list/js/order-list-config.js

@@ -73,16 +73,20 @@ var assetsConf = {
   // 开发票
   // 开发票
   invokeLink: {
   invokeLink: {
     invoke: { // 开发票
     invoke: { // 开发票
-      wx: '/front/invoice/showpage',
-      app: '/jyapp/front/invoice/showpage'
+      // wx: '/front/invoice/showpage',
+      // app: '/jyapp/front/invoice/showpage'
+      wx: '/jy_mobile/invoice/Invoicing',
+      app: '/jy_mobile/invoice/Invoicing'
     },
     },
     cantInvoke: {  // 开发票超时(不能开发票)
     cantInvoke: {  // 开发票超时(不能开发票)
       wx: '/front/invoice/cantInvoice',
       wx: '/front/invoice/cantInvoice',
       app: '/jyapp/front/cantInvoice'
       app: '/jyapp/front/cantInvoice'
     },
     },
     lookInvoice: {
     lookInvoice: {
-      wx: '/front/invoice/check_invoice.html',
-      app: '/jyapp/front/invoice/check_invoice.html'
+      // wx: '/front/invoice/check_invoice.html',
+      // app: '/jyapp/front/invoice/check_invoice.html'
+      wx: '/jy_mobile/invoice/viewInvoice',
+      app: '/jy_mobile/invoice/viewInvoice'
     }
     }
   },
   },
   // 数据导出(历史数据)
   // 数据导出(历史数据)

+ 22 - 10
src/web/staticres/common-module/order-list/js/order-list.js

@@ -841,19 +841,32 @@ var vm = new Vue({
         if (canBuyAgain.indexOf(productType) !== -1 && order.pay_money > 0) {
         if (canBuyAgain.indexOf(productType) !== -1 && order.pay_money > 0) {
           state.bugAgainShow = true
           state.bugAgainShow = true
           state.bugAgainText = '再次购买'
           state.bugAgainText = '再次购买'
+        }
+          // 已完成订单 开发票判断  0未申请  1/2已申请
+        if (order.applybill_status === 1 || order.applybill_status === 2) {
+          // 查看发票
+          state.invokeButtonText = '查看发票'
         }
         }
         // 判断开发票
         // 判断开发票
         // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
         // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
         var backstageOrderCanInvoke = order.is_backstage_order === 0 || order.order_channel === 'xdqd04'
         var backstageOrderCanInvoke = order.is_backstage_order === 0 || order.order_channel === 'xdqd04'
-        if (canInvoke.indexOf(productType) !== -1 && order.billingMode === 1 && backstageOrderCanInvoke) {
+        if (state.invokeButtonText  === '开发票' && canInvoke.indexOf(productType) !== -1 && order.billingMode === 1 && backstageOrderCanInvoke) {
           state.invokeButtonShow = true
           state.invokeButtonShow = true
         }
         }
+      // if(order.source === 1){ // 线下发票隐藏按钮
+      //   state.invokeButtonShow = false
+      // }
+      if (state.invokeButtonText  === '开发票' && !order.invoice_price) {
+        state.invokeButtonShow = false
 
 
-        // 已完成订单 开发票判断  0未申请  1/2已申请
-        if (order.applybill_status === 1 || order.applybill_status === 2) {
-          // 查看发票
-          state.invokeButtonText = '查看发票'
-        }
+      } 
+       if (state.invokeButtonText  === '查看发票') {
+        if (order.invoice_show) {
+          state.invokeButtonShow = true
+        }else{
+          state.invokeButtonShow = false
+        }  
+      }
 
 
       } else if (orderStatus === -2 || orderStatus === -3) {
       } else if (orderStatus === -2 || orderStatus === -3) {
         // 已取消或者已删除订单
         // 已取消或者已删除订单
@@ -868,9 +881,6 @@ var vm = new Vue({
       if (cbConf) {
       if (cbConf) {
         Object.assign(state, cbConf)
         Object.assign(state, cbConf)
       }
       }
-      if(order.source === 1){ // 线下发票隐藏按钮
-        state.invokeButtonShow = false
-      }
       return state
       return state
 
 
     },
     },
@@ -1060,7 +1070,9 @@ var vm = new Vue({
             }
             }
           } else {
           } else {
             // 不能开发票跳转
             // 不能开发票跳转
-            var href = assetsConf.invokeLink.cantInvoke[platform]
+            // var href = assetsConf.invokeLink.cantInvoke[platform]
+            // p537 调整为取消此不能开发票限制 
+            var href = assetsConf.invokeLink.invoke[platform]
             if (href) {
             if (href) {
               _this.goToLinkAndSaveState(`${href}?order_code=${orderCode}`)
               _this.goToLinkAndSaveState(`${href}?order_code=${orderCode}`)
             }
             }

+ 114 - 0
src/web/staticres/electronic_invoice/css/check_invoice.css

@@ -22,6 +22,120 @@
   color: #2CB7CA;
   color: #2CB7CA;
 }
 }
 
 
+#check_invoice .invoice_status{
+  position: relative;
+  padding-top: 24px;
+  /* width: auto; */
+}
+#check_invoice .invoice_status .invoice_num {
+  margin-bottom: 12px;
+  height: 22px;
+  line-height: 22px;
+  font-size: 14px;
+  color: #1D1D1D;
+}
+.invoice_main{
+  width: 100%;
+  height: 40px;
+  overflow-x: scroll;
+  overflow-y: hidden;
+}
+.invoice_main::-webkit-scrollbar {
+  display: none;
+}
+.white_shadow{
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  display: flex;
+  align-items: center;
+  width: 110px;
+  height: 40px;
+  z-index: 9;
+  cursor: pointer;
+  background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+}
+.white_shadow.right_shadow{
+  display: flex;
+  justify-content: flex-end;
+  right: 0;
+  left: initial;
+  background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+}
+.white_shadow .el-iconfont {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 28px;
+  height: 28px;
+  background: rgba(0, 0, 0, 0.12);
+  border-radius: 50%;
+}
+.el-icon-arrow-left, .el-icon-arrow-right{
+  font-size: 20px;
+}
+#check_invoice .invoice_status .invoice_status_list{
+  position: relative;
+  left: 0;
+  display: flex;
+  align-items: center;
+  height: 40px;
+  min-width: 1200px;
+  max-width: 100%;
+}
+#check_invoice .invoice_status .invoice_status_item{
+  flex: none;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding: 8px 16px;
+  margin-right: 12px;
+  height: 40px;
+  border: 1px solid #E0E0E0;
+  border-radius: 4px;
+  background-color: #F2F2F4;
+  color: #686868;
+  font-size: 12px;
+  cursor: pointer;
+}
+
+#check_invoice .invoice_status .invoice_status_item_title{
+  margin-right: 8px;
+  font-size: 16px;
+  color: #1D1D1D;
+}
+#check_invoice .invoice_status .invoice_status_item.active{
+  background-color: #EAF8FA;
+  border: 1px solid #2CB7CA;
+}
+#check_invoice .invoice_status .invoice_status_item.active .invoice_status_item_title{
+  color: #2ABED1;
+}
+.w.invoice_fail_container{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 32px;
+}
+.w.invoice_fail_container .invoice_fail{
+  width: 100%;
+  text-align: center;
+}
+.w.invoice_fail_container .invoice_fail .invoice_fail_title{
+  font-size: 18px;
+  color: #171826;
+  line-height: 28px;
+}
+.w.invoice_fail_container .invoice_fail_title .el-icon-error{
+  margin-right: 10px;
+  font-size: 20px;
+  color: #FB483D;
+}
+.w.invoice_fail_container .invoice_fail_content {
+  font-size: 13px;
+  color: #5F5E64;
+  line-height: 20px;
+}
 #check_invoice .step {
 #check_invoice .step {
   height: auto;
   height: auto;
   padding-left: 140px;
   padding-left: 140px;

+ 98 - 1
src/web/staticres/electronic_invoice/css/invoice.css

@@ -53,6 +53,96 @@ input[type="number"] {
   padding: 26px 30px 50px;
   padding: 26px 30px 50px;
 }
 }
 
 
+#invoice .invoice_main .i_m_body .el-form-item {
+  margin-bottom: 12px;
+  width: 696px;
+  height: 36px;
+}
+#invoice .invoice_main .i_m_body .invoice_unit{
+  border-bottom: 1px dashed #E0E0E0;
+  margin-bottom: 12px;
+}
+#invoice .invoice_main .i_m_body .el-form-item .el-button{
+  width: 180px;
+  height: 46px;
+  background-color: #2ABED1;
+  color: #FFFFFF;
+  font-size: 16px;
+}
+#invoice .invoice_main .i_m_body .el-form-item .el-button.el-button--default{
+  border: 1px solid #E0E0E0;
+  background-color: #fff;
+  color: #1D1D1D;
+}
+#invoice .invoice_main .i_m_body .el-form-item .el-form-item__content{
+  line-height: 36px;
+}
+#invoice .invoice_main .i_m_body .el-form-item .el-form-item__content .el-button.is-disabled {
+  background-color: #87DFEA;
+  color: rgba(255, 255, 255, 0.6);
+}
+.el-form-item.invoice_select .el-select{
+  width: 260px;
+}
+#invoice .invoice_main .i_m_body .el-form-item.invoice_unit_name{
+  position: relative;
+}
+#invoice .invoice_main .i_m_body .el-form-item.invoice_unit_name .box-card{
+  position: absolute;
+  top: 40px;
+  width: 590px;
+  z-index: 9;
+  border-radius: 4px;
+  border: 1px solid #2ABED1;
+}
+#invoice .invoice_main .i_m_body .el-form-item.invoice_unit_name .box-card .el-card__body {
+  padding: 0;
+}
+#invoice .invoice_main .i_m_body .el-form-item.invoice_unit_name .box-card .list-item{
+  padding: 0 20px;
+  cursor: pointer;
+}
+.el-form-item.invoice_unit_name .box-card .list-item .high-light {
+  color: #2ABED1;
+}
+#invoice .invoice_main .i_m_body .el-form-item.invoice_unit_name .box-card .list-item:hover{
+  background-color: #ECECEC;
+}
+#invoice .invoice_main .i_m_body .el-form-item .el-input__inner{
+  height: 36px;
+  line-height: 36px;
+}
+#invoice .invoice_main .i_m_body .el-form-item .el-form-item__label {
+  position: relative;
+  height: 36px;
+  line-height: 36px;
+  text-align: left;
+}
+.el-form-item__label:before{
+  position: absolute;
+  left: -8px;
+}
+#invoice .invoice_main .i_m_body .el-form-item .el-form-item__error{
+  top: 26%;
+  right: -218px;
+  left: initial;
+  min-width: 200px;
+  font-size: 14px;
+}
+
+#invoice .invoice_main .i_m_body .el-radio__input.is-checked .el-radio__inner {
+  border-color: #2ABED1;
+  background: #fff;
+}
+
+#invoice .invoice_main .i_m_body .el-radio__input.is-checked .el-radio__inner::after{
+  width: 8px;
+  height: 8px;
+  background-color: #2ABED1;
+}
+#invoice .invoice_main .i_m_body .el-radio.is-checked .el-radio__label {
+  color: #1D1D1D;
+}
 #invoice .invoice_main .i_m_body .copyright {
 #invoice .invoice_main .i_m_body .copyright {
   line-height: 24px;
   line-height: 24px;
 }
 }
@@ -168,7 +258,6 @@ input[type="number"] {
 }
 }
 
 
 #invoice .toast {
 #invoice .toast {
-  display: none;
   position: fixed;
   position: fixed;
   top: 50%;
   top: 50%;
   left: 50%;
   left: 50%;
@@ -262,4 +351,12 @@ input[type="number"] {
   border: 0;
   border: 0;
   color: #fff;
   color: #fff;
   outline: 0;
   outline: 0;
+}
+
+.invoice_select_option .el-scrollbar__view.el-select-dropdown__list {
+  display: flex;
+  flex-direction: column;
+}
+.invoice_select_option .el-select-dropdown__item.selected {
+  color: #2ABED1;
 }
 }

+ 166 - 166
src/web/staticres/electronic_invoice/js/invoice.js

@@ -34,171 +34,171 @@ function checkForm() {
     }
     }
 }
 }
 
 
-$(function () {
-    checkForm();//初始化
-    /*
-        |-- dom [object]        :指定生成下拉列表组件的dom对象。
-        |-- name[string]            :设置表单控件的name属性值。隐藏域的name属性,用来校验表单
-        |-- data [object]        :生成下拉列表选项的数据。
-        |-- fn[function]        :选择下来列表后的回调函数。
-    */
-    // 发票抬头
-    simSelect({
-        'dom': document.getElementById('invoice_title'),
-        'data': [{ 'key': '单位', 'value': '单位' }, { 'key': '个人', 'value': '个人' }],
-        'name': 'invoice_title',
-        'fn': function (val) {
-            if(val == '单位'){
-                $('.unit_invoice').show();
-                checkForm();
-            }else{
-                $('.unit_invoice').hide();
-                checkForm();
-            }
-        }
-    });
+// $(function () {
+//     // checkForm();//初始化
+//     /*
+//         |-- dom [object]        :指定生成下拉列表组件的dom对象。
+//         |-- name[string]            :设置表单控件的name属性值。隐藏域的name属性,用来校验表单
+//         |-- data [object]        :生成下拉列表选项的数据。
+//         |-- fn[function]        :选择下来列表后的回调函数。
+//     */
+//     // 发票抬头
+//     simSelect({
+//         'dom': document.getElementById('invoice_title'),
+//         'data': [{ 'key': '单位', 'value': '单位' }, { 'key': '个人', 'value': '个人' }],
+//         'name': 'invoice_title',
+//         'fn': function (val) {
+//             if(val == '单位'){
+//                 $('.unit_invoice').show();
+//                 checkForm();
+//             }else{
+//                 $('.unit_invoice').hide();
+//                 checkForm();
+//             }
+//         }
+//     });
 
 
-    // 公司名称校验
-    $('.unit_name').on('blur',function(){
-        if ($(this).val() == '') {
-            $(this).parent().siblings('.success').hide().siblings('.error').hide();
-            return;
-        }
-        if(regCompany.test($(this).val())){
-            $(this).parent().siblings('.success').show().siblings('.error').hide();
-            checkForm();
-        }else{
-            $(this).parent().siblings('.success').hide().siblings('.error').show();
-            checkForm();
-        }
-    })
-    // 纳税人识别号校验
-    $('.taxpayer_number').on('blur',function(){
-        if ($(this).val() == '') {
-            $(this).parent().siblings('.success').hide().siblings('.error').hide();
-            return;
-        }
-        if(regCode.test($(this).val())){
-            $(this).parent().siblings('.success').show().siblings('.error').hide();
-            checkForm();
-        }else{
-            $(this).parent().siblings('.success').hide().siblings('.error').show();
-            checkForm();
-        }
-    })
-    // 手机号校验
-    $('.tel').on('blur',function(){
-        if ($(this).val() == '') {
-            $(this).parent().siblings('.success').hide().siblings('.error').hide();
-            return;
-        }
-        if(regPhone.test($(this).val())){
-            $(this).parent().siblings('.success').show().siblings('.error').hide();
-            checkForm();
-        }else{
-            $(this).parent().siblings('.success').hide().siblings('.error').show();
-            checkForm();
-        }
-    })
-    // 邮箱校验
-    $('.email').on('blur',function(){
-        if ($(this).val() == '') {
-            $(this).parent().siblings('.success').hide().siblings('.error').hide();
-            return;
-        }
-        if(regEmail.test($(this).val())){
-            $(this).parent().siblings('.success').show().siblings('.error').hide();
-            checkForm();
-        }else{
-            $(this).parent().siblings('.success').hide().siblings('.error').show();
-            checkForm();
-        }
-    })
-    // 初始化默认选择
-    function initSelect(){
-        $('input[name="invoice_title"]').val("个人");
-        $('#invoice_title button').html("个人");
-        $('.unit_invoice').hide()
-    }
-    initSelect();
-    // 提交
-    $('.submit_btn').click(function(){
-		var order_code =$(".order_code").text();
-        var company = $('.unit_name').val().trim();//开票单位
-        var code = $('.taxpayer_number').val().trim();//纳税人识别号
-        var phone = $('.tel').val().trim();//手机号
-        var email = $('.email').val().trim();//邮箱
-        var inputUnit = $('input[name="invoice_title"]').val();//发票抬头
-        var param = "";
-		var invoice_title = $("#invoice_title > button").text()
-		if (invoice_title == '个人') {
-            param = {
-            	"order_code": order_code,
-            	"invoice_type": "个人",
-            	"email": email,
-            	"phone_num": phone
-            }
-        } else {
-			param = {
-				"order_code": order_code,
-				"invoice_type": "单位",
-				"company": company,
-				"id_num": code,
-				"email": email,
-				"phone_num": phone
-			}
-        }
-		$('.toast').show("linear");
-		setTimeout(function () {
-		    $('.toast').hide();
-		}, 2000)
-		var changed = getParam("changed");
-		var isSys = getParam("isSys");
-		if(isSys === "true"){
-			param["isSys"] = true
-		}
-		if(changed === "true"){
-			$.ajax({
-	            url: "/jypay/invoice/replace",
-	            async: false,//设置为同步执行 (兼容火狐浏览器)
-	            type: "POST",
-	            data: param,
-	            success: function (data) {
-	            }
-	        });
-			window.location.replace("/front/order/check_invoice/"+order_code);
-			return
-		}
-		$.ajax({
-            url: "/jypay/invoice/add",
-            async: false,//设置为同步执行 (兼容火狐浏览器)
-            type: "POST",
-            data: param,
-            success: function (data) {
-            }
-        });
-		window.location.replace("/front/order/check_invoice/"+order_code);
-    })
-    // 取消
-    $('.cancel_btn').click(function(){
-        $('.unit_name').val('');
-        $('.taxpayer_number').val('');
-        $('.tel').val('');
-        $('.email').val('');
-        $('input[name="invoice_title"]').val("个人");
-        $('#invoice_title button').html("个人");
-        $('.error').hide()
-        $('.success').hide()
-    })
+//     // 公司名称校验
+//     $('.unit_name').on('blur',function(){
+//         if ($(this).val() == '') {
+//             $(this).parent().siblings('.success').hide().siblings('.error').hide();
+//             return;
+//         }
+//         if(regCompany.test($(this).val())){
+//             $(this).parent().siblings('.success').show().siblings('.error').hide();
+//             checkForm();
+//         }else{
+//             $(this).parent().siblings('.success').hide().siblings('.error').show();
+//             checkForm();
+//         }
+//     })
+//     // 纳税人识别号校验
+//     $('.taxpayer_number').on('blur',function(){
+//         if ($(this).val() == '') {
+//             $(this).parent().siblings('.success').hide().siblings('.error').hide();
+//             return;
+//         }
+//         if(regCode.test($(this).val())){
+//             $(this).parent().siblings('.success').show().siblings('.error').hide();
+//             checkForm();
+//         }else{
+//             $(this).parent().siblings('.success').hide().siblings('.error').show();
+//             checkForm();
+//         }
+//     })
+//     // 手机号校验
+//     $('.tel').on('blur',function(){
+//         if ($(this).val() == '') {
+//             $(this).parent().siblings('.success').hide().siblings('.error').hide();
+//             return;
+//         }
+//         if(regPhone.test($(this).val())){
+//             $(this).parent().siblings('.success').show().siblings('.error').hide();
+//             checkForm();
+//         }else{
+//             $(this).parent().siblings('.success').hide().siblings('.error').show();
+//             checkForm();
+//         }
+//     })
+//     // 邮箱校验
+//     $('.email').on('blur',function(){
+//         if ($(this).val() == '') {
+//             $(this).parent().siblings('.success').hide().siblings('.error').hide();
+//             return;
+//         }
+//         if(regEmail.test($(this).val())){
+//             $(this).parent().siblings('.success').show().siblings('.error').hide();
+//             checkForm();
+//         }else{
+//             $(this).parent().siblings('.success').hide().siblings('.error').show();
+//             checkForm();
+//         }
+//     })
+//     // 初始化默认选择
+//     function initSelect(){
+//         $('input[name="invoice_title"]').val("个人");
+//         $('#invoice_title button').html("个人");
+//         $('.unit_invoice').hide()
+//     }
+//     initSelect();
+//     // 提交
+//     $('.submit_btn').click(function(){
+// 		var order_code =$(".order_code").text();
+//         var company = $('.unit_name').val().trim();//开票单位
+//         var code = $('.taxpayer_number').val().trim();//纳税人识别号
+//         var phone = $('.tel').val().trim();//手机号
+//         var email = $('.email').val().trim();//邮箱
+//         var inputUnit = $('input[name="invoice_title"]').val();//发票抬头
+//         var param = "";
+// 		var invoice_title = $("#invoice_title > button").text()
+// 		if (invoice_title == '个人') {
+//             param = {
+//             	"order_code": order_code,
+//             	"invoice_type": "个人",
+//             	"email": email,
+//             	"phone_num": phone
+//             }
+//         } else {
+// 			param = {
+// 				"order_code": order_code,
+// 				"invoice_type": "单位",
+// 				"company": company,
+// 				"id_num": code,
+// 				"email": email,
+// 				"phone_num": phone
+// 			}
+//         }
+// 		$('.toast').show("linear");
+// 		setTimeout(function () {
+// 		    $('.toast').hide();
+// 		}, 2000)
+// 		var changed = getParam("changed");
+// 		var isSys = getParam("isSys");
+// 		if(isSys === "true"){
+// 			param["isSys"] = true
+// 		}
+// 		if(changed === "true"){
+// 			$.ajax({
+// 	            url: "/jypay/invoice/replace",
+// 	            async: false,//设置为同步执行 (兼容火狐浏览器)
+// 	            type: "POST",
+// 	            data: param,
+// 	            success: function (data) {
+// 	            }
+// 	        });
+// 			window.location.replace("/front/order/check_invoice/"+order_code);
+// 			return
+// 		}
+// 		$.ajax({
+//             url: "/jypay/invoice/add",
+//             async: false,//设置为同步执行 (兼容火狐浏览器)
+//             type: "POST",
+//             data: param,
+//             success: function (data) {
+//             }
+//         });
+// 		window.location.replace("/front/order/check_invoice/"+order_code);
+//     })
+//     // 取消
+//     $('.cancel_btn').click(function(){
+//         $('.unit_name').val('');
+//         $('.taxpayer_number').val('');
+//         $('.tel').val('');
+//         $('.email').val('');
+//         $('input[name="invoice_title"]').val("个人");
+//         $('#invoice_title button').html("个人");
+//         $('.error').hide()
+//         $('.success').hide()
+//     })
 
 
-	function getParam(name) {
-		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
-		var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配
-		var context = "";
-		if (r != null)
-			context = r[2];
-		reg = null;
-		r = null;
-		return context == null || context == "" || context == "undefined" ? "" : context;
-	}
-})
+// 	function getParam(name) {
+// 		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+// 		var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配
+// 		var context = "";
+// 		if (r != null)
+// 			context = r[2];
+// 		reg = null;
+// 		r = null;
+// 		return context == null || context == "" || context == "undefined" ? "" : context;
+// 	}
+// })

+ 2 - 2
src/web/templates/areaPack/pc/page_order.html

@@ -221,9 +221,9 @@
                             $(".pay_num_p").css("display", "");
                             $(".pay_num_p").css("display", "");
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             //发票
                             //发票
-                            if (r.data.order.applybill_status === 0) {
+                            if (r.data.order.applybill_status === 0 && r.data.order.invoice_price) {
                                 $(".openinvoice").css("display", "");
                                 $(".openinvoice").css("display", "");
-                            } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                            } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                     checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                     checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                 })
                                 })

+ 2 - 2
src/web/templates/frontRouter/pc/dataFile/sess/orderDetail.html

@@ -189,9 +189,9 @@
                             $(".pay_num_p").css("display", "");
                             $(".pay_num_p").css("display", "");
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             //发票
                             //发票
-                            if (r.data.order.applybill_status === 0 && r.data.order.billingMode === 1 && r.data.order.is_backstage_order === 0 && r.data.order.source !== 1) {
+                            if (r.data.order.applybill_status === 0 && r.data.order.billingMode === 1 && r.data.order.is_backstage_order === 0 && r.data.order.invoice_price) {
                                 $(".openinvoice").css("display", "");
                                 $(".openinvoice").css("display", "");
-                            } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.order.source !== 1 ) {
+                            } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2 ) {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                     checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                     checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                 })
                                 })

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

@@ -178,9 +178,9 @@
                             $(".pay_num_p").show();
                             $(".pay_num_p").show();
                         }
                         }
                         //发票
                         //发票
-                        if (r.data.applybill_status === 0 && r.data.source !== 1) {
+                        if (r.data.applybill_status === 0 && r.data.invoice_price) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
-                        } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                        } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                             $(".lookinvoice").css("display", "").on("click", function () {
                             $(".lookinvoice").css("display", "").on("click", function () {
                                 checkinvoice(r.data.applybill_status, orderCode)
                                 checkinvoice(r.data.applybill_status, orderCode)
                             })
                             })

+ 2 - 2
src/web/templates/order/pc/buyerPortraitPack/detail.html

@@ -190,9 +190,9 @@
                             $(".pay_num_p").css("display", "");
                             $(".pay_num_p").css("display", "");
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             //发票
                             //发票
-                            if (r.data.order.applybill_status === 0) {
+                            if (r.data.order.applybill_status === 0 && r.data.order.invoice_price) {
                                 $(".openinvoice").css("display", "");
                                 $(".openinvoice").css("display", "");
-                            } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                            } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                     checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                     checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                 })
                                 })

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

@@ -166,9 +166,9 @@
                         $(".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 && r.data.orderInfo.invoice_price) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
-                        } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                        } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                             $(".lookinvoice").css("display", "").on("click", function () {
                             $(".lookinvoice").css("display", "").on("click", function () {
                                 checkinvoice(r.data.applybill_status, orderCode)
                                 checkinvoice(r.data.applybill_status, orderCode)
                             })
                             })

+ 1 - 1
src/web/templates/order/pc/filePack/detail.html

@@ -190,7 +190,7 @@
                             $(".pay_num_p").css("display", "");
                             $(".pay_num_p").css("display", "");
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             //发票
                             //发票
-                            if (r.data.order.applybill_status === 0) {
+                            if (r.data.order.applybill_status === 0 && r.data.order.invoice_price) {
                                 $(".openinvoice").css("display", "");
                                 $(".openinvoice").css("display", "");
                             } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                             } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                 $(".lookinvoice").css("display", "").on("click", function () {

+ 1 - 1
src/web/templates/order/pc/integral/integralDetail.html

@@ -200,7 +200,7 @@
                             $(".pay_num_p").show();
                             $(".pay_num_p").show();
                         }
                         }
                         //发票
                         //发票
-                        if (r.data.applybill_status === 0) {
+                        if (r.data.applybill_status === 0 && r.data.invoice_price) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
                         } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                         } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                             $(".lookinvoice").css("display", "").on("click", function () {
                             $(".lookinvoice").css("display", "").on("click", function () {

+ 1 - 1
src/web/templates/pc/aiPack_orderDetail.html

@@ -225,7 +225,7 @@
                         if (source===""){
                         if (source===""){
                             if (r.data.is_backstage_order!==1){
                             if (r.data.is_backstage_order!==1){
                                 //发票
                                 //发票
-                                if (r.data.applybill_status === 0) {
+                                if (r.data.applybill_status === 0 && r.data.invoice_price) {
                                     $(".openinvoice").css("display", "");
                                     $(".openinvoice").css("display", "");
                                 }  else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                 }  else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                     $(".lookinvoice").css("display", "").on("click", function () {

+ 210 - 34
src/web/templates/pc/check_invoice.html

@@ -20,6 +20,10 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/check_invoice.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/check_invoice.css?v={{Msg "seo" "version"}}">
+    <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet" />
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/index.js></script>
+    <script type="text/javascript" src="{{Msg "seo" "cdn"}}/big-member/js/utils.js"></script>
     <!--[if lt IE 9]>
     <!--[if lt IE 9]>
             <script src="https://cdn-common.jianyu360.com/cdn/lib/html5shiv/3.7.3/html5shiv.min.js"></script>
             <script src="https://cdn-common.jianyu360.com/cdn/lib/html5shiv/3.7.3/html5shiv.min.js"></script>
             <script src="https://cdn-common.jianyu360.com/cdn/lib/respond-js/1.4.2/respond.min.js"></script>
             <script src="https://cdn-common.jianyu360.com/cdn/lib/respond-js/1.4.2/respond.min.js"></script>
@@ -43,27 +47,55 @@
     <!-- header -->
     <!-- header -->
 	{{include "/common/pchead.html"}}
 	{{include "/common/pchead.html"}}
     <!-- main  START -->
     <!-- main  START -->
-    <div class="check_invoice" id="check_invoice">
+    <div class="check_invoice" id="check_invoice" style="display: none;">
         <div class="w ci_crumb">
         <div class="w ci_crumb">
             <a href="javascript:;" data-type="work-bench" data-href="/front/swordfish/toMyOrder">我的订单</a><em> > </em>
             <a href="javascript:;" data-type="work-bench" data-href="/front/swordfish/toMyOrder">我的订单</a><em> > </em>
             <a href="javascript:;" class="active">查看发票</a>
             <a href="javascript:;" class="active">查看发票</a>
         </div>
         </div>
-        <div class="w step clearfix">
+        <div class="w invoice_status" v-if="invoiceData.length > 1">
+          <div class="white_shadow left_shadow" @click="clickArrow('left')" v-if="invoiceData.length > 6 && leftBtn">
+            <div class="el-iconfont">
+              <i class="el-icon-arrow-left"></i>
+            </div>
+          </div>
+          <div class="invoice_num">共 <span style="color: #2ABED1;" class="num">${invoiceData.length}</span> 张发票</div>
+          <div class="invoice_main">
+            <div class="invoice_status_list">
+              <div class="invoice_status_item" @click="changeInvoice(item)" :class="{'active': item.active}" v-for="(item, index) in invoiceData" :key="index" >
+                <div class="invoice_status_item_title">${item.info.title}</div>
+                <div class="invoice_status_item_content">申请时间: ${item.info.time}</div>
+              </div>
+            </div>
+          </div>
+          <div class="white_shadow right_shadow" @click="clickArrow('right')" v-if="invoiceData.length > 6 && rightBtn">
+            <div class="el-iconfont">
+              <i class="el-icon-arrow-right"></i>
+            </div>
+          </div>
+        </div>
+        <div class="w step clearfix" v-if="selectinvoice.invoice_status !== -1">
             <!-- 进行中 类名为 active  已完成 类名为 finish  未完成默认颜色-->
             <!-- 进行中 类名为 active  已完成 类名为 finish  未完成默认颜色-->
-            <div id="l" class="pro l active"></div>
-            <div id="c" class="pro c">财务处理</div>
-            <div id="r" class="pro r">发票开具</div>
+            <div id="l" class="pro l" :class="{'active': selectinvoice.invoice_status === 0}">已完成</div>
+            <div id="c" class="pro c" :class="{'active': selectinvoice.invoice_status === 0}">财务处理</div>
+            <div id="r" class="pro r" :class="{'finish': selectinvoice.invoice_status === 1}">发票开具</div>
             <div class="rules" data-toggle="modal" data-target="#ruleModal">开票规则</div>
             <div class="rules" data-toggle="modal" data-target="#ruleModal">开票规则</div>
         </div>
         </div>
+        <div class="w step invoice_fail_container" v-else>
+          <div class="invoice_fail">
+            <div class="invoice_fail_title"><i class="el-icon-error"></i>开票失败</div>
+            <div class="invoice_fail_content">公司名称/单位税号填写错误,请核实开票信息再次申请开票</div>
+          </div>
+          <div class="rules" data-toggle="modal" data-target="#ruleModal">开票规则</div>
+        </div>
         <div class="w ci_main">
         <div class="w ci_main">
             <!-- 订单信息 -->
             <!-- 订单信息 -->
             <div class="ci_list">
             <div class="ci_list">
                 <div class="list_thead">
                 <div class="list_thead">
-                    <span>订单编号:<span class="order_code"></span></span>
+                    <span>订单编号:<span class="order_code">${selectinvoice.invoice_order_code}</span></span>
                 </div>
                 </div>
                 <div class="list_tbody">
                 <div class="list_tbody">
-                    <p>发票类型:普通发票(电子发票)  </p>
-                    <p>发票内容:明细</p>
+                    <p>发票类型:${selectinvoice.invoice_variety} </p>
+                    <p>发票内容:${selectinvoice.invoice_content}</p>
                 </div>
                 </div>
             </div>
             </div>
             <!-- 发票信息 -->
             <!-- 发票信息 -->
@@ -72,21 +104,30 @@
                     <span>发票信息</span>
                     <span>发票信息</span>
                 </div>
                 </div>
                 <div class="list_tbody">
                 <div class="list_tbody">
-					<p>发票抬头:<span id="fptt"></span></p>
-                    <p class="displaynone company_p">公司名称:<span class="company_name"></span></p>
-                    <p class="displaynone tax_p">纳税人识别号:<span class="tax_num"></span></p>
-                    <p>手机号:<span class="phonenum"></span></p>
-                    <p>电子邮箱:<span class="mail"></span></p>
+					          <p>发票抬头:<span>${selectinvoice.invoice_type}</span></p>
+                    <div v-if="selectinvoice.invoice_type == '单位'">
+                      <p class="displaynone company_p">公司名称:<span class="company_name">${selectinvoice.company_name}</span></p>
+                      <p class="displaynone tax_p">单位税号:<span class="tax_num">${selectinvoice.taxpayer_identnum}</span></p>
+                      <p>单位地址:<span class="company_address">${selectinvoice.company_address}</span></p>
+                      <p>电话号码:<span class="phonenum">${selectinvoice.company_phone}</span></p>
+                      <p>开户银行:<span class="bank_name">${selectinvoice.bank_name}</span></p>
+                      <p>银行账号:<span class="bank_account">${selectinvoice.bank_account}</span></p>
+                      <p>开票备注:<span class="remark">${selectinvoice.remark || '-'}</span></p>
+                    </div>
+                    <p>联系电话:<span class="phonenum">${selectinvoice.phone}</span></p>
+                    <p>电子邮箱:<span class="mail">${selectinvoice.mail}</span></p>
+                    <p v-if="selectinvoice.invoice_type == '个人'">开票备注:<span class="remark">${selectinvoice.remark || '-'}</span></p>
                 </div>
                 </div>
             </div>
             </div>
             <!-- 状态 -->
             <!-- 状态 -->
             <div class="btn-cells">
             <div class="btn-cells">
-              <p class="backInvoice backP" style="display: none;padding-bottom: 8px;color: red;">系统问题,开票失败</p>
-              <button class="btn btn-confirm backInvoice" style="display: none;">重新开票</button>
-              <button class="btn btn-confirm" id="ing" disabled id="opening" style="border: 0;">开票中</button>
-              <button class="btn btn-confirm" style="display: none;" id="look_invoice">查看发票</button>
-              <button class="btn btn-cancel" style="display: none;" id="again_invoice">换开申请</button>
-              <p style="text-align: center;font-size: 14px;color: #686868;padding: 12px 0">您申请的发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收。</p>
+              <!-- <p class="backInvoice backP" style="display: none;padding-bottom: 8px;color: red;">系统问题,开票失败</p> -->
+              <button class="btn btn-confirm" id="ing" disabled v-if="selectinvoice.invoice_status == 0" style="border: 0;">开票中</button>
+              <button class="btn btn-confirm" @click="lookInvoice" id="look_invoice" v-if="selectinvoice.invoice_status == 1">查看发票</button>
+              <button class="btn btn-cancel" @click="againInvoice('replace')" id="again_invoice" v-if="selectinvoice.invoice_status == 1 && !selectinvoice.changed">换开申请</button>
+              <button class="btn btn-confirm" @click="againInvoice('again')" v-if="selectinvoice.invoice_status == -1">再次开票</button>
+              <button class="btn btn-confirm" @click="concatKf" v-if="selectinvoice.isReopen">联系客服</button>
+              <p style="text-align: center;font-size: 14px;color: #686868;padding: 12px 0">您申请的发票已由平台开具并发送至您的邮箱,请注意查收。</p>
             </div>
             </div>
         </div>
         </div>
         <!-- 开票规则弹窗 -->
         <!-- 开票规则弹窗 -->
@@ -98,11 +139,9 @@
                     </div>
                     </div>
                     <div class="modal-body">
                     <div class="modal-body">
                         <div class="text" style="text-align:justify;">
                         <div class="text" style="text-align:justify;">
-                          1.平台提供电子普通发票,您可点击“我的订单-开发票”,开票内容统一为“信息技术服务”。<br>
-                          2.您申请的发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收。<br>
-                          3.购买线上产品服务,请在订单完成90天内,申请开票,逾期请联系客服,开具纸质发票。<br>
-                          4.如需开具增值税专用发票,请联系客服,开票金额<200元发票邮寄费用自行承担。 <br>
-                          客服电话:400-108-6670
+                          1.平台提供电子普通发票、电子专用发票,发票内容为可选“信息技术服务-技术服务费”、“信息技术服务-会员费”、“信息技术服务-招投标数据服务”;<br>
+                          2.您申请的电子发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收;<br>
+                          3.如有问题可联系客服,客服电话:400-108-6670。<br>
                         </div>
                         </div>
                     </div>
                     </div>
                     <div class="modal-footer">
                     <div class="modal-footer">
@@ -144,8 +183,8 @@
           });
           });
       });
       });
 			var order_code={{.T.order_code}};
 			var order_code={{.T.order_code}};
-			$(".order_code").text(order_code)
-			viewInvoice(order_code)
+			// $(".order_code").text(order_code)
+			// viewInvoice(order_code)
 			//checkInvoice(order_code);
 			//checkInvoice(order_code);
 			var changed = false;
 			var changed = false;
 			var interval;
 			var interval;
@@ -266,13 +305,13 @@
 				}, 2000)
 				}, 2000)
 			}
 			}
 
 
-			$("#again_invoice").on("click",function(){
-        if(!redInvoiceSwitch){
-          $('#switchModal').modal('show').find('.text').text(redInvoiceMsg);
-        }else{
-				  window.location.href = "/front/order/invoice/"+ order_code +"?changed=true";
-        }
-			})
+			// $("#again_invoice").on("click",function(){
+      //   if(!redInvoiceSwitch){
+      //     $('#switchModal').modal('show').find('.text').text(redInvoiceMsg);
+      //   }else{
+			// 	  window.location.href = "/front/order/invoice/"+ order_code +"?changed=true";
+      //   }
+			// })
 
 
 			function viewInvoice(order_code){
 			function viewInvoice(order_code){
 				$.post("/jypay/invoice/show",{"order_code":order_code},function(r){
 				$.post("/jypay/invoice/show",{"order_code":order_code},function(r){
@@ -394,7 +433,144 @@
 					}
 					}
 				})
 				})
 			})
 			})
-
+      var invoiceDetailNode = new Vue({
+        el: '#check_invoice',
+        delimiters: ['${', '}'],
+        data() {
+          return {
+            invoiceData: [],
+            selectinvoice: {},
+            loading: true,
+            leftBtn: false,
+            rightBtn: true
+          }
+        },
+        created() {
+          this.getInvoiceShowList();
+        },
+        mounted() {
+          $('#check_invoice').show()
+        },
+        methods: {
+          // 联系客服
+          concatKf: function () {
+            if (goTemplateData.inIframe) {
+              window.$BRACE.$emit('open-customer')
+            } else {
+              // 打开客服弹窗
+              checkCustomerService()
+            }
+          },
+          getInvoiceShowList() {
+            const url = '/jypay/invoice/showList'
+            const params = {
+              order_code: order_code
+            }
+            this.ajaxComponent(url, params).then(res => {
+              if (res && res.status === 'success') {
+                const list = res?.invoiceData
+                if(list.length) {
+                  list.forEach((e, i) => {
+                    let info = {
+                      title: '',
+                      time: ''
+                    }
+                    info.time = new Date(e.create_time * 1000).pattern('yyyy-MM-dd')
+                    switch (e.invoice_status) {
+                      case -2:
+                        // 已冲红
+                        info.title = '已冲红'
+                        break;
+                      case -1:
+                        // 开票失败
+                        info.title = '开票失败'
+                        break;
+                      case 0:
+                        // 开票中
+                        info.title = '开票中'
+                        break;
+                      case 1:
+                        // 开票成功
+                        info.title = '已开具'
+                        break;
+                      default:
+                        break;
+                    }
+                    e.info = info
+                    e.active = false
+                    if(i == 0) {
+                      e.active = true
+                    }
+                  });
+                  this.invoiceData = list
+                  this.selectinvoice = list[0]
+                }
+              }
+            })
+          },
+          changeInvoice(item) {
+            this.invoiceData.forEach(e => {
+              e.active = false
+            });
+            item.active = true
+            this.selectinvoice = item
+          },
+          clickArrow(data) {
+            var invoiceStatusList = $('.invoice_status_list');
+            var invoiceStatusListWidth = invoiceStatusList.width();
+            var invoiceStatusItem = $('.invoice_status_item')
+            var itemAllWidth = $('.invoice_status_item').map(function() {
+              return $(this).outerWidth() + 12; // 获取包括内边距的宽度 + margin值
+            }).get();
+            itemAllWidth = itemAllWidth.reduce((a, b) => a + b) - 1200;
+            var currentLeft = invoiceStatusList.position().left;
+            if(data == 'right') {
+              this.leftBtn = true
+              if(currentLeft <= -itemAllWidth) {
+                invoiceStatusList.css('left', -itemAllWidth + 'px');
+                this.rightBtn = false
+                return;
+              }
+              invoiceStatusList.css('left', currentLeft - 100 + 'px');
+            } else {
+              if(currentLeft >= 0) {
+                this.leftBtn = false
+                this.rightBtn = true
+                return;
+              }
+              this.rightBtn = true
+              invoiceStatusList.css('left', currentLeft + 100 + 'px');
+            }
+          },
+          // 查看发票
+          lookInvoice() {
+            if(this.selectinvoice.invoice_status == 1) {
+              window.open(this.selectinvoice.url, '_blank');
+            }
+          },
+          // 换开发票
+          againInvoice(type) {
+            window.open(`/front/order/invoice/${order_code}?type=${type}&invoiceid=${this.selectinvoice.id}`, '_blank');
+          },
+          // 封装公共ajax
+          ajaxComponent(url, params, contentType) {
+            return new Promise((resolve, reject) => {
+              $.ajax({
+                type: "POST",
+                url: url,
+                contentType: contentType || 'application/x-www-form-urlencoded',
+                data: contentType ? JSON.stringify(params) : params || {},
+                success: function (res) {
+                  resolve(res)
+                }.bind(this),
+                error: function (err) {
+                  reject(err)
+                }.bind(this)
+              });
+            });
+          }
+        }
+      })
 		})
 		})
 
 
 		$("#public-nav").css("background","#fff");
 		$("#public-nav").css("background","#fff");

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

@@ -218,9 +218,9 @@
                             $(".pay_num_p").css("display", "");
                             $(".pay_num_p").css("display", "");
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             //发票 "item.applybill_status === 0 &&  && item.is_backstage_order === 0"
                             //发票 "item.applybill_status === 0 &&  && item.is_backstage_order === 0"
-                            if (r.data.order.applybill_status === 0 && r.data.order.billingMode === 1 && r.data.order.is_backstage_order === 0) {
+                            if (r.data.order.applybill_status === 0 && r.data.order.invoice_price && r.data.order.billingMode === 1 && r.data.order.is_backstage_order === 0) {
                                 $(".openinvoice").css("display", "");
                                 $(".openinvoice").css("display", "");
-                            } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                            } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                 $(".lookinvoice").css("display", "").on("click", function () {
                                     checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                     checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                 })
                                 })

+ 1 - 1
src/web/templates/pc/entniche_orderDetail.html

@@ -155,7 +155,7 @@
                         $(".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 && r.data.invoice_price) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
                         } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                         } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                             $(".lookinvoice").css("display", "").on("click", function () {
                             $(".lookinvoice").css("display", "").on("click", function () {

+ 437 - 146
src/web/templates/pc/invoice.html

@@ -22,6 +22,10 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/city-picker.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/city-picker.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/invoice.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/electronic_invoice/css/invoice.css?v={{Msg "seo" "version"}}">
+    <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet" />
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/index.js></script>
+    <script type="text/javascript" src="{{Msg "seo" "cdn"}}/big-member/js/utils.js"></script>
     <!--[if lt IE 9]>
     <!--[if lt IE 9]>
             <script src="https://cdn-common.jianyu360.com/cdn/lib/html5shiv/3.7.3/html5shiv.min.js"></script>
             <script src="https://cdn-common.jianyu360.com/cdn/lib/html5shiv/3.7.3/html5shiv.min.js"></script>
             <script src="https://cdn-common.jianyu360.com/cdn/lib/respond-js/1.4.2/respond.min.js"></script>
             <script src="https://cdn-common.jianyu360.com/cdn/lib/respond-js/1.4.2/respond.min.js"></script>
@@ -43,8 +47,25 @@
 	input:-ms-input-placeholder { /* Internet Explorer 10+ */
 	input:-ms-input-placeholder { /* Internet Explorer 10+ */
 	    color: #999999;
 	    color: #999999;
 	}
 	}
+  .custom-toast {
+    /* display: none; */
+  }
+  .custom-toast .toast-container{
+    /* display: none; */
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    width: auto;
+    padding: 16px 32px;
+    font-size: 16px;
+    background: rgba(0, 0, 0, 0.65);
+    border-radius: 8px;
+    color: #fff;
+    transform: translateX(-50%) translateY(-50%);
+    z-index: 99;
+  }
 </style>
 </style>
-<body class="hidden">
+<body>
     <!-- header -->
     <!-- header -->
 	{{include "/common/pchead.html"}}
 	{{include "/common/pchead.html"}}
     <!-- main  START -->
     <!-- main  START -->
@@ -56,73 +77,76 @@
         <div class="w invoice_main">
         <div class="w invoice_main">
             <div class="i_m_head">开发票<a style="float: right;color: #2CB7CA;" data-toggle="modal" data-target="#ruleModal">开票规则</a></div>
             <div class="i_m_head">开发票<a style="float: right;color: #2CB7CA;" data-toggle="modal" data-target="#ruleModal">开票规则</a></div>
             <div class="i_m_body">
             <div class="i_m_body">
-                <div class="invariability">
-                    <div class="clearfix invoice_control">
-                        <div class="fl invoice_control_label">订单编号:</div>
-                        <div class="fl order_code"></div>
-                    </div>
-                    <div class="clearfix invoice_control">
-                        <div class="fl invoice_control_label">发票类型:</div>
-                        <div class="fl">普通发票(电子发票)</div>
-                    </div>
-                    <div class="clearfix invoice_control">
-                        <div class="fl invoice_control_label">发票内容:</div>
-                        <div class="fl">明细</div>
-                    </div>
-                    <div class="clearfix invoice_control">
-                        <div class="fl invoice_control_label">发票抬头:</div>
-                        <div class="fl invoice_control_select" id="invoice_title"></div>
-                    </div>
-                </div>
+                <el-form  :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
+                  <el-form-item label="订单编号:" >
+                    <div>${ruleForm.order_code}</div>
+                  </el-form-item>
+                  <el-form-item label="发票类型:">
+                    <el-radio-group v-model="ruleForm.invoice_variety">
+                      <el-radio label="电子普通发票">电子普通发票</el-radio>
+                      <el-radio label="电子专用发票">电子专用发票</el-radio>
+                    </el-radio-group>
+                  </el-form-item>
+                  <el-form-item label="发票内容:" class="invoice_select">
+                    <el-select popper-class="invoice_select_option" v-model="ruleForm.invoice_content">
+                      <el-option v-for="(item, index) in invoiceContentList" :label="item.label" :key="index" :value="item.label"></el-option>
+                    </el-select>
+                  </el-form-item>
+                  <el-form-item label="发票抬头:">
+                    <el-radio-group v-model="ruleForm.invoice_type">
+                      <el-radio v-if="ruleForm.invoice_variety != '电子专用发票'" label="个人"></el-radio>
+                      <el-radio label="单位"></el-radio>
+                    </el-radio-group>
+                  </el-form-item>
+                  <div class="invoice_unit" v-if="ruleForm.invoice_type == '单位'">
+                    <el-form-item label="公司名称:" class="invoice_unit_name" prop="company_name">
+                      <el-input @blur="handleBlur" @input="handleInput" placeholder="请输入公司名称" v-model="ruleForm.company_name"></el-input>
+                      <el-card class="box-card" v-if="companyList.length">
+                        <div @click="handleClick(item)" v-html="setHighLight(item)" v-for="(item, index) in companyList" :key="index" class="list-item"></div>
+                      </el-card>
+                    </el-form-item>
+                    <el-form-item label="单位税号:" prop="taxpayer_identnum">
+                      <el-input @blur="validateForm" placeholder="请输入单位税号" v-model="ruleForm.taxpayer_identnum"></el-input>
+                    </el-form-item>
+                    <el-form-item style="min-height: 36px;height: auto;" label="单位地址:" :rules="[{ required: ruleForm.invoice_variety == '电子专用发票', message: '请输入单位地址', trigger: 'blur' }]" prop="company_address">
+                      <el-input ref="company_address" :style="{height: addressHeight + 'px'}" type="textarea" :rows="1" placeholder="请输入单位地址" v-model="ruleForm.company_address"></el-input>
+                    </el-form-item>
+                    <el-form-item label="电话号码:">
+                      <el-input maxlength="11" placeholder="请输入电话号码" v-model="ruleForm.company_phone"></el-input>
+                    </el-form-item>
+                    <el-form-item label="开户银行:">
+                      <el-input placeholder="请输入开户银行" v-model="ruleForm.bank_name"></el-input>
+                    </el-form-item>
+                    <el-form-item label="银行账号:">
+                      <el-input placeholder="请输入银行账号" v-model="ruleForm.bank_account"></el-input>
+                    </el-form-item>
+                    <el-form-item style="min-height: 36px;height: auto;" class="invoice_desc" label="开票备注:">
+                      <el-input ref="remark" :style="{height: remarkHeight + 'px'}" :rows="1" placeholder="非必填,此部分内容会展示在发票“备注”上,请按照贵司财务要求进行填写" type="textarea" v-model="ruleForm.remark"></el-input>
+                    </el-form-item>
+                  </div>
+                  <el-form-item label="联系电话:" prop="phone">
+                    <el-input maxlength="11" @blur="validateForm" placeholder="请输入手机号" v-model="ruleForm.phone"></el-input>
+                  </el-form-item>
+                  <el-form-item  label="电子邮箱:" prop="mail">
+                    <el-input @blur="validateForm" placeholder="邮箱用于接收电子发票" v-model="ruleForm.mail"></el-input>
+                  </el-form-item>
+                  <el-form-item style="min-height: 36px;height: auto;" v-if="ruleForm.invoice_type == '个人'" label="开票备注:">
+                    <el-input ref="remark" :style="{height: remarkHeight + 'px'}" :rows="1" placeholder="非必填,此部分内容会展示在发票“备注”上,请按照贵司财务要求进行填写" type="textarea" v-model="ruleForm.remark"></el-input>
+                  </el-form-item>
+                  <el-form-item style="margin-top: 32px;">
+                    <el-button :disabled="!isFormValid" type="primary" @click="submitForm('ruleForm')">提交</el-button>
+                    <el-button @click="resetForm('ruleForm')">取消</el-button>
+                  </el-form-item>
+                </el-form>
                 <!-- 单位发票信息 -->
                 <!-- 单位发票信息 -->
-                <div class="unit_invoice">
-                    <div class="clearfix invoice_control" id="unitName">
-                        <div class="fl invoice_control_label">公司名称:</div>
-                        <div class="fl invoice_control_input" name="" id="">
-                            <input type="text" placeholder="请输入公司名称" class="unit_name">
-                        </div>
-                        <span class="error"><i class="iconfont icon-cuowutishi"></i>开票单位名称格式不正确</span>
-                        <span class="success"><i class="iconfont icon-zhengquetishi"></i></span>
-                    </div>
-                    <div class="clearfix invoice_control" id="txtNumber">
-                        <div class="fl invoice_control_label">纳税人识别号:</div>
-                        <div class="fl invoice_control_input" name="" id="">
-                            <input type="text" placeholder="请输入纳税人识别号" maxlength="18" class="taxpayer_number">
-                        </div>
-                        <span class="error"><i class="iconfont icon-cuowutishi"></i>纳税人识别号格式不正确</span>
-                        <span class="success"><i class="iconfont icon-zhengquetishi"></i></span>
-                    </div>
-                </div>
-                <div class="common_invoice">
-                    <div class="clearfix invoice_control" id="telBox">
-                        <div class="fl invoice_control_label">手机号:</div>
-                        <div class="fl invoice_control_input" name="" id="">
-                            <input type="text" placeholder="请输入手机号" maxlength="11" onkeyup="this.value=this.value.replace(/\D/g,'')" class="tel">
-                        </div>
-                        <span class="error"><i class="iconfont icon-cuowutishi"></i>手机号格式不正确</span>
-                        <span class="success"><i class="iconfont icon-zhengquetishi"></i></span>
-                    </div>
-                    <div class="clearfix invoice_control" id="emailBox">
-                        <div class="fl invoice_control_label">电子邮箱:</div>
-                        <div class="fl invoice_control_input" name="" id="">
-                            <input type="text" placeholder="邮箱用于接收电子发票" class="email">
-                        </div>
-                        <span class="error"><i class="iconfont icon-cuowutishi"></i>邮箱格式不正确</span>
-                        <span class="success"><i class="iconfont icon-zhengquetishi"></i></span>
-                    </div>
-                </div>
-                <div class="invoice_btn">
-                    <button class="submit_btn save-btn" disabled>提交</button>
-                    <button class="cancel_btn">取消</button>
-                </div>
                 <p style="text-align: justify;font-size: 14px;color: #686868;padding: 12px 0 12px 100px;">您申请的发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收。</p>
                 <p style="text-align: justify;font-size: 14px;color: #686868;padding: 12px 0 12px 100px;">您申请的发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收。</p>
             </div>
             </div>
         </div>
         </div>
         <!-- toast提示框 -->
         <!-- toast提示框 -->
-        <div class="toast">
+        <!-- <div class="toast" v-if="toastStatus.toastShow">
             <i class="iconfont icon-zhifuwancheng"></i>
             <i class="iconfont icon-zhifuwancheng"></i>
-            <span>提交成功</span>
-        </div>
+            <span>${toastStatus.text}</span>
+        </div> -->
     </div>
     </div>
 	  <div class="modal fade" id="ruleModal" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
 	  <div class="modal fade" id="ruleModal" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
 	    <div class="modal-dialog">
 	    <div class="modal-dialog">
@@ -132,11 +156,9 @@
 	            </div>
 	            </div>
 	            <div class="modal-body">
 	            <div class="modal-body">
 	                <div class="text">
 	                <div class="text">
-                    1.平台提供电子普通发票,您可点击“我的订单-开发票”,开票内容统一为“信息技术服务”。<br>
-                    2.您申请的发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收。<br>
-                    3.购买线上产品服务,请在订单完成90天内,申请开票,逾期请联系客服,开具纸质发票。<br>
-                    4.如需开具增值税专用发票,请联系客服,开票金额<200元发票邮寄费用自行承担。 <br>
-                    客服电话:400-108-6670
+                    1.平台提供电子普通发票、电子专用发票,发票内容为可选“信息技术服务-技术服务费”、“信息技术服务-会员费”、“信息技术服务-招投标数据服务”;<br>
+                    2.您申请的电子发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收;<br>
+                    3.如有问题可联系客服,客服电话:400-108-6670。<br>
 	                </div>
 	                </div>
 	            </div>
 	            </div>
 	            <div class="modal-footer">
 	            <div class="modal-footer">
@@ -171,85 +193,9 @@
     <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/invoice.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/invoice.js?v={{Msg "seo" "version"}}"></script>
 	<script>
 	<script>
 		  $(function(){
 		  $(function(){
-        var orderCode = {{.T.order_code}};
-        // 查询是否可以开发票
-        $.ajax({
-          url: '/jypay/invoice/switch',
-          type: "GET",
-          success: function(res) {
-            if (res.code === '1001') {
-              $('body').removeClass('hidden')
-              // 不能开票
-              $('#switchModal').modal('show').find('.text').text(res.messge)
-              return
-            } else{
-              $.post("/jypay/invoice/available",{order_code:orderCode},function(rr){
-                if(rr.status==0){
-                  window.location.replace("/front/order/invoicetimeOut?f=upgrade")
-                }else{
-                  $("body").removeClass("hidden");
-          			  var order_mail = {{.T.mail}};
-          			  var order_phone = {{.T.phone}};
-          			  if(order_mail!==""&&order_mail!==null&&order_mail!==undefined){
-          				$(".email").val(order_mail)
-          				$(".email").parent().siblings('.success').show();
-          			  }
-          			  if(order_phone!==""&&order_phone!==null&&order_phone!==undefined){
-          			  	$(".tel").val(order_phone)
-          				$(".tel").parent().siblings('.success').show();
-          			  }
-          			  var isSys = getParam("isSys");
-          			  if(isSys === "true"){
-        			  	  $.ajax({
-        			  	  	type: 'POST',
-        			  	  	url: '/jypay/invoice/show',
-        			  	  	data: {"order_code":orderCode},
-        					    success: function(r){
-            						if(r.status === "processing"){
-            							if(r.data.invoice_type === "个人"){
-            								$(".email").val(r.data.mail);
-            								$(".tel").val(r.data.phone);
-            								$(".email").parent().siblings('.success').show();
-            								$(".tel").parent().siblings('.success').show();
-            							}else{
-            								$(".email").val(r.data.mail);
-            								$(".tel").val(r.data.phone);
-            								$(".unit_name").val(r.data.company_name);
-            								$(".taxpayer_number").val(r.data.taxpayer_identnum);
-            								$(".email").parent().siblings('.success').show();
-            								$(".tel").parent().siblings('.success').show();
-            								$(".unit_name").parent().siblings('.success').show();
-            								$(".taxpayer_number").parent().siblings('.success').show();
-            								$("#invoice_title > button").text("单位")
-            								$(".unit_invoice").show();
-            							}
-            						}
-        					    }
-        			  	  });
-          			  }
-          			  checkForm();
-          			  var order_code = {{.T.order_code}};
-          			  $(".order_code").text(order_code);
-          			  $(".cancel_btn").on("click",function(){
-          					window.history.go(-1);
-          			  })
-
-          			  $('#ruleModal').on('show.bs.modal', function () {
-          			      var $this = $(this);
-          			      var $modal_dialog = $this.find('.modal-dialog');
-          			      $this.css('display', 'block');
-          			      $modal_dialog.css({
-          			          'margin-top': Math.max(0, ($(window).height() - $modal_dialog.height()) / 2)
-          			      });
-          			  });
-
-          			  $("#public-nav").css("background","#fff");
-          			  $(".public-nav").css("border-bottom", "1px solid #e0e0e0");
-                }
-              });
-            }
-          }
-        })
+        var order_code = {{.T.order_code}};
+        var order_mail = {{.T.mail}};
+        var order_phone = {{.T.phone}};
         haslogin({{.T.logid}});
         haslogin({{.T.logid}});
         $('#i-know-btn').on('click', function () {
         $('#i-know-btn').on('click', function () {
             // 新窗口打开
             // 新窗口打开
@@ -263,6 +209,351 @@
                 history.back()
                 history.back()
             }
             }
         })
         })
+        var invoiceNode = new Vue({
+          el: '#invoice',
+          delimiters: ['${', '}'],
+          data() {
+            return {
+              ruleForm: {
+                order_code: '',
+                invoice_content: '信息技术服务-技术服务费',
+                invoice_type: '单位',
+                invoice_variety: '电子普通发票',
+                mail: '',
+                phone: '',
+                remark: '',
+                company_name: '',
+                taxpayer_identnum: '',
+                company_address: '',
+                company_phone: '',
+                bank_name: '',
+                bank_account: ''
+              },
+              invoiceContentList: [
+                {
+                  label: '信息技术服务-技术服务费',
+                  value: '信息技术服务-技术服务费'
+                },
+                {
+                  label: '信息技术服务-会员费',
+                  value: '信息技术服务-会员费'
+                },
+                {
+                  label: '信息技术服务-招投标数据服务',
+                  value: '信息技术服务-招投标数据服务'
+                }
+              ],
+              rules: {
+                phone: [
+                  { required: true, message: '请输入手机号', trigger: 'blur' },
+                  { min: 11, max: 11, message: '手机号长度为11位', trigger: 'blur' }
+                ],
+                mail: [
+                  { required: true, message: '请输入邮箱地址', trigger: 'blur' },
+                  { type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
+                ],
+                company_name: [
+                  { required: true, message: '请输入单位名称', trigger: 'blur' }
+                ],
+                taxpayer_identnum: [
+                  { required: true, message: '请输入纳税人识别号', trigger: 'blur' },
+                  { validator: this.validateCode, trigger: 'blur' }
+
+                ],
+                company_address: [
+                  { required: true, message: '请输入单位地址', trigger: 'blur' }
+                ]
+              },
+              companyList: [],
+              urlParams: {
+                type: '',
+                invoiceid: '',
+                only_Identifying: ''
+              },
+              addressHeight: 36,
+              remarkHeight: 36,
+              isFormValid: false // 表单是否通过校验
+            }
+          },
+          created () {
+            this.ruleForm.order_code = order_code
+            this.ruleForm.mail = order_mail
+            this.ruleForm.phone = order_phone
+            const type = utils.getParam('type')
+            const invoiceid = utils.getParam('invoiceid')
+            this.urlParams.type = type
+            this.urlParams.invoiceid = invoiceid
+            this.setPageOver()
+            this.invouceInfoEcho()
+          },
+          mounted() {
+            setTimeout(() => {
+              this.validateForm()
+            }, 200)
+          },
+          watch: {
+            'ruleForm.invoice_variety': {
+              handler (val) {
+                if (val === '电子专用发票') {
+                  this.ruleForm.invoice_type = '单位'
+                }
+              }
+            },
+            'ruleForm.company_address': {
+              handler() {
+                this.addressHeight = this.getTextareaHeight(this.$refs.company_address.$el);
+              }
+            },
+            'ruleForm.remark': {
+              handler() {
+                this.remarkHeight = this.getTextareaHeight(this.$refs.remark.$el);
+              }
+            },
+            'ruleForm.invoice_type': {
+              handler(val) {
+                // 清空校验
+                this.$refs['ruleForm'].clearValidate();
+              }
+            }
+          },
+          methods: {
+            // 查询是否可以开发票
+            setPageOver () {
+              const switchUrl = '/jypay/invoice/switch'
+              const url = '/jypay/invoice/available'
+              const params = {
+                order_code: this.ruleForm.order_code
+              }
+              this.ajaxComponent(switchUrl).then(r => {
+                if (r.code === '1001') {
+                  // 不能开票
+                  $('#switchModal').modal('show').find('.text').text(r.messge)
+                  return
+                } else {
+                  this.ajaxComponent(url, params).then(res => {
+                    if(res) {
+                      if(res.status !== 1) {
+                        window.location.replace("/front/order/invoicetimeOut?f=upgrade")
+                      }
+                    }
+                  })
+                }
+              })
+            },
+            validateForm() {
+              this.$refs.ruleForm.validate(valid => {
+                // this.$refs.ruleForm.clearValidate();
+                this.isFormValid = valid
+              });
+            },
+            getTextareaHeight(textareaEl) {
+              textareaEl = textareaEl.querySelector('textarea');
+              textareaEl.style.height = 'auto';
+              textareaEl.style.height = `${textareaEl.scrollHeight}px`;
+              console.info(textareaEl.clientHeight, 'textareaEl')
+              return textareaEl.clientHeight;
+            },
+            // 发票信息回显
+            invouceInfoEcho () {
+              const url = '/jypay/invoice/newShow'
+              const params = {
+                stype: 2,
+                code: this.urlParams.invoiceid
+              }
+              this.ajaxComponent(url, params).then((res) => {
+                if(res) {
+                  this.echoFun(res.data.invoice)
+                }
+              })
+            },
+            echoFun(data) {
+              const { only_Identifying, invoice_type, invoice_variety, invoice_content, mail, phone, remark, company_name, taxpayer_identnum, company_address, company_phone, bank_name, bank_account } = data
+              this.ruleForm.invoice_type = invoice_type
+              this.ruleForm.invoice_variety = invoice_variety
+              this.ruleForm.invoice_content = invoice_content
+              this.ruleForm.mail = mail
+              this.ruleForm.phone = phone
+              this.ruleForm.remark = remark
+              this.ruleForm.company_name = company_name
+              this.ruleForm.taxpayer_identnum = taxpayer_identnum
+              this.ruleForm.company_address = company_address
+              this.ruleForm.company_phone = company_phone
+              this.ruleForm.bank_name = bank_name
+              this.ruleForm.bank_account = bank_account
+              this.urlParams.only_Identifying = only_Identifying
+            },
+            validateCode: (rule, value, callback) => {
+              if (!value) {
+                return callback(new Error('请输入纳税人识别号'))
+              } else {
+                if (
+                  value.trim().length === 18 ||
+                  value.trim().length === 15 ||
+                  value.trim().length === 20
+                ) {
+                  return callback()
+                }
+                return callback(new Error('请输入正确的纳税人识别号'))
+              }
+            },
+            setHighLight(item) {
+              const keyword = utils.replaceKeyword(item.name, this.ruleForm.company_name, '<span class="highlight-text">' + this.ruleForm.company_name + '</span>')
+              return keyword
+            },
+            submitForm(formName) {
+              this.$refs[formName].validate((valid) => {
+                if (valid) {
+                  const { order_code, invoice_content, invoice_type, invoice_variety, mail, phone, remark, company_name, taxpayer_identnum, company_address, company_phone, bank_name, bank_account } = this.ruleForm
+                  let params = {
+                    order_code: order_code, // 唯一标识
+                    invoice_variety: invoice_variety, // 发票类型
+                    invoiceContent: invoice_content, // 发票内容
+                    invoice_type: invoice_type, // 发票抬头
+                    phone: phone, // 手机号
+                    mail: mail, // 邮箱
+                    remark: remark, // 备注
+                    source: 0 // 来源
+                  }
+                  if (invoice_type === '单位') {
+                    params = {
+                      order_code: order_code, // 唯一标识
+                      invoice_variety: invoice_variety, // 发票类型
+                      invoiceContent: invoice_content, // 发票内容
+                      invoice_type: invoice_type, // 发票抬头
+                      company_name: company_name, // 公司名称
+                      taxpayer_identnum: taxpayer_identnum, // 单位税号
+                      company_address: company_address, // 单位地址
+                      company_phone: company_phone, // 电话号码
+                      bank_name: bank_name, // 开户银行
+                      bank_account: bank_account, // 银行账号
+                      phone: phone, // 手机号
+                      mail: mail, // 邮箱
+                      remark: remark, // 备注
+                      source: 0 // 来源
+                    }
+                  }
+                  let url = '/jypay/invoice/submit'
+                  if(this.urlParams.type === 'replace') {
+                    // 换开发票接口
+                    url = '/jypay/invoice/newReplace'
+                    params.sid = this.urlParams.invoiceid
+                  } else if(this.urlParams.type === 'again') {
+                    // 开票失败,再次开票
+                    params.only_Identifying = this.urlParams.only_Identifying
+                  }
+                  this.onConfirm(url, params)
+                } else {
+                  console.log('error submit!!');
+                  return false;
+                }
+              });
+            },
+            onConfirm(url, params) {
+              this.ajaxComponent(url, params).then((res) => {
+                if(res && res.error_code === 0) {
+                  this.toastFn('提交成功', 2000)
+                } else {
+                  this.toastFn(res.error_msg || res.invoice_msg, 2000)
+                }
+              }).catch(err => {
+                this.toastFn('提交失败', 2000)
+              })
+            },
+            resetForm(formName) {
+              this.ruleForm = {
+                order_code: '',
+                invoice_content: '信息技术服务-技术服务费',
+                invoice_type: '单位',
+                invoice_variety: '电子普通发票',
+                mail: '',
+                phone: '',
+                remark: '',
+                company_name: '',
+                taxpayer_identnum: '',
+                company_address: '',
+                company_phone: '',
+                bank_name: '',
+                bank_account: ''
+              }
+            },
+            handleInput(value) {
+              utils.debounce(this.getCompanyList(value), 300)
+            },
+            handleBlur() {
+              setTimeout(() => {
+                this.companyList = []
+              }, 200);
+              this.validateForm()
+            },
+            handleClick(item) {
+              const { name, taxCode } = item
+              this.ruleForm.company_name = name
+              this.ruleForm.taxpayer_identnum = taxCode
+              setTimeout(() => {
+                this.companyList = []
+              }, 200);
+            },
+            getCompanyList(key) {
+              if(!key) return
+              const url = '/bigmember/search/ent/association'
+              const params = {
+                name: key,
+                type: "ent",
+                num: "5"
+              }
+              this.ajaxComponent(url, params).then((res) => {
+                if(res && res.error_code === 0) {
+                  if(res.data.list) {
+                    this.companyList = res.data.list
+                  } else {
+                    this.companyList = []
+                  }
+                }
+              })
+            },
+            // debounce(fn, delay) {
+            //   let timeoutId;
+            //   return function(...args) {
+            //     if (timeoutId) {
+            //       clearTimeout(timeoutId);
+            //     }
+            //     timeoutId = setTimeout(() => {
+            //       fn.apply(this, args);
+            //       timeoutId = null;
+            //     }, delay);
+            //   };
+            // },
+            // 封装公共ajax
+            ajaxComponent(url, params, contentType) {
+              return new Promise((resolve, reject) => {
+                $.ajax({
+                  type: "POST",
+                  url: url,
+                  contentType: contentType || 'application/x-www-form-urlencoded',
+                  data: contentType ? JSON.stringify(params) : params || {},
+                  success: function (res) {
+                    resolve(res)
+                  }.bind(this),
+                  error: function (err) {
+                    reject(err)
+                  }.bind(this)
+                });
+              });
+            },
+            toastFn: function (text, duration) {
+              if (!duration) {
+                duration = 1000
+              }
+              var _html = ""
+              _html+='<div class="custom-toast"><div class="mask" style="background-color: transparent;"></div><div class="toast-container">'
+              _html+='<span>' + text + '</span></div></div>'
+              $('body').append(_html)
+              setTimeout(function(){
+                $(".custom-toast").fadeOut().remove();
+              },duration)
+            }
+          }
+        })
       })
       })
 	</script>
 	</script>
 </body>
 </body>

+ 2 - 2
src/web/templates/pc/medaratus_orderDetail.html

@@ -295,9 +295,9 @@
                             //发票
                             //发票
                             // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
                             // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
                             if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
                             if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
-                                if (r.data.order.applybill_status === 0) {
+                                if (r.data.order.applybill_status === 0 && r.data.order.invoice_price) {
                                     $(".openinvoice").css("display", "");
                                     $(".openinvoice").css("display", "");
-                                } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                                } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                         checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                         checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                     })
                                     })

+ 3 - 9
src/web/templates/pc/member_orderDetail.html

@@ -354,7 +354,7 @@
                         }
                         }
                         if (source===""){
                         if (source===""){
                             if(r.data.is_backstage_order!==1){ //发票
                             if(r.data.is_backstage_order!==1){ //发票
-                                if (r.data.applybill_status === 0) {
+                                if (r.data.applybill_status === 0 && r.data.invoice_price) {
                                     $(".openinvoice").css("display", "").on("click", function () {
                                     $(".openinvoice").css("display", "").on("click", function () {
                                         // return false // 待可开发票时删除
                                         // return false // 待可开发票时删除
 
 
@@ -362,15 +362,9 @@
                                             checkinvoice(2, '', '请联系客服开票<br>客服热线:400-108-6670')
                                             checkinvoice(2, '', '请联系客服开票<br>客服热线:400-108-6670')
                                             return
                                             return
                                         }
                                         }
-                                        $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (r) {
-                                            if (r.status != 1) {
-                                                window.open("/front/order/invoicetimeOut", '_self');
-                                            } else {
-                                                window.open("/front/order/invoice/" + orderCode, '_self');
-                                            }
-                                        })
+                                        window.open("/front/order/invoice/" + orderCode, '_self');
                                     });
                                     });
-                                }else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                                }else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                         checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                         checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                     })
                                     })

+ 9 - 17
src/web/templates/pc/myOrder.html

@@ -554,10 +554,10 @@
                           '再次' : '去'#@支付</a></p>
                           '再次' : '去'#@支付</a></p>
                       <p><a data-jy-track="click-hover" @click="goCancel(item)">取消订单</a></p>
                       <p><a data-jy-track="click-hover" @click="goCancel(item)">取消订单</a></p>
                     </div>
                     </div>
-                    <div v-if="item.order_status === 1 && (item.filter.source || '') === '' && item.filter.badge!='exchange'">
-                      <p><a v-if="item.applybill_status === 0 && item.source !== 1" data-jy-track="click-hover"
+                    <div v-if="item.order_status === 1 && item.filter.badge!='exchange'">
+                      <p><a v-if="item.applybill_status === 0 && (item.is_backstage_order === 0 || item.order_channel === 'xdqd04' ||  item.qmx_invoice ) && item.invoice_price" data-jy-track="click-hover"
                           @click="goInvoice(item)">开发票</a></p>
                           @click="goInvoice(item)">开发票</a></p>
-                      <p><a v-if="(item.applybill_status === 1 || item.applybill_status === 2) && item.source !== 1" data-jy-track="click-hover" @click="goInvoice(item)">发票信息</a></p>
+                      <p><a v-if="item.invoice_show" data-jy-track="click-hover" @click="goInvoice(item)">发票信息</a></p>
                     </div>
                     </div>
                   </div>
                   </div>
                   <div class="handleBox" v-else-if="item.product_type === '大会员-AI中标预测包'
                   <div class="handleBox" v-else-if="item.product_type === '大会员-AI中标预测包'
@@ -574,9 +574,9 @@
                     </div>
                     </div>
                     <div v-if="item.order_status === 1 && (item.filter.source || '') === ''&& item.filter.badge!='exchange'">
                     <div v-if="item.order_status === 1 && (item.filter.source || '') === ''&& item.filter.badge!='exchange'">
                       <!--                                        <div v-if="(item.filter.canInvoice !=undefined  && !item.filter.canInvoice)">-->
                       <!--                                        <div v-if="(item.filter.canInvoice !=undefined  && !item.filter.canInvoice)">-->
-                      <p><a v-if="item.applybill_status === 0 && item.source !== 1" data-jy-track="click-hover"
+                      <p><a v-if="item.applybill_status === 0 && item.invoice_price" data-jy-track="click-hover"
                           @click="goInvoice(item)">开发票</a></p>
                           @click="goInvoice(item)">开发票</a></p>
-                      <p><a v-if="(item.applybill_status === 1 || item.applybill_status === 2) && item.source !== 1"
+                      <p><a v-if="item.invoice_show"
                           data-jy-track="click-hover" @click="goInvoice(item)">发票信息</a></p>
                           data-jy-track="click-hover" @click="goInvoice(item)">发票信息</a></p>
                       <!--                                        </div>-->
                       <!--                                        </div>-->
                     </div>
                     </div>
@@ -593,11 +593,9 @@
                     </p>
                     </p>
                     <!--已完成 && && item.filter.badge!='exchange' P307 权益码兑换 不开发票-->
                     <!--已完成 && && item.filter.badge!='exchange' P307 权益码兑换 不开发票-->
                     <p v-if="item.order_status === 1 && item.filter.badge!='exchange'"><a
                     <p v-if="item.order_status === 1 && item.filter.badge!='exchange'"><a
-                        v-if="item.applybill_status === 0 && item.billingMode === 1 && (item.is_backstage_order === 0 || item.order_channel === 'xdqd04') && item.source !== 1"
+                        v-if="item.billingMode === 1 && (item.is_backstage_order === 0 || item.order_channel === 'xdqd04' ||  item.qmx_invoice ) && item.invoice_price"
                         data-jy-track="click-hover" @click="goInvoice(item)">开发票</a></p>
                         data-jy-track="click-hover" @click="goInvoice(item)">开发票</a></p>
-                    <p v-if="item.order_status === 1"><a
-                        v-if="(item.applybill_status === 1 || item.applybill_status === 2) && item.source !== 1" data-jy-track="click-hover"
-                        @click="goInvoice(item)">发票信息</a></p>
+                    <p v-if="item.order_status === 1"><a v-if="item.invoice_show" data-jy-track="click-hover" @click="goInvoice(item)">发票信息</a></p>
                     <!--已取消-->
                     <!--已取消-->
                     <!--历史数据 再次购买-->
                     <!--历史数据 再次购买-->
                     <p v-if="item.product_type === '历史数据'"><a target="_parent" :href="'/front/dataExport/toSieve?id=' + item.filter_id">再次购买</a>
                     <p v-if="item.product_type === '历史数据'"><a target="_parent" :href="'/front/dataExport/toSieve?id=' + item.filter_id">再次购买</a>
@@ -1388,7 +1386,7 @@
             } else if (item.product_type === '大会员' && item.pay_way === 'transferAccounts') {
             } else if (item.product_type === '大会员' && item.pay_way === 'transferAccounts') {
               this.goShowTipForInvoice('请联系客服开票<br>客服热线:400-108-6670')
               this.goShowTipForInvoice('请联系客服开票<br>客服热线:400-108-6670')
             } else {
             } else {
-              this.goOpenInvoice(item.order_code)
+              window.open("/front/order/invoice/" + item.order_code);
             }
             }
           } else {
           } else {
             if (item.applybill_status === 2) {
             if (item.applybill_status === 2) {
@@ -1435,13 +1433,7 @@
           }
           }
         },
         },
         goOpenInvoice: function (code) {
         goOpenInvoice: function (code) {
-          $.post("/subscribepay/orderListDetails/isOver", { "order_code": code }, function (r) {
-            if (r.status !== 1) {
-              window.open("/front/order/invoicetimeOut");
-            } else {
-              window.open("/front/order/invoice/" + code);
-            }
-          })
+          window.open("/front/order/invoice/" + code);
         },
         },
         goDetail: function (item) {
         goDetail: function (item) {
           var href = ''
           var href = ''

+ 3 - 7
src/web/templates/pc/orderDetail.html

@@ -516,12 +516,8 @@
     $(function () {
     $(function () {
         var orderStatus = {{ .T.o.order_status }};
         var orderStatus = {{ .T.o.order_status }};
         var invoiceStatus = {{ .T.o.applybill_status }}
         var invoiceStatus = {{ .T.o.applybill_status }}
+        var invoicePrice = {{ .T.o.invoice_price }}
         var orderCode = {{.T.o.order_code}}
         var orderCode = {{.T.o.order_code}}
-        try{
-        var source_ ={{.T.o.source}}
-        }catch(e){
-
-        }
 
 
         if (orderStatus === 0) {
         if (orderStatus === 0) {
             $("#status_wait_pay").show();
             $("#status_wait_pay").show();
@@ -529,9 +525,9 @@
             $(".o_m_thead").removeClass("greenBg").addClass("redBg")
             $(".o_m_thead").removeClass("greenBg").addClass("redBg")
         } else if (orderStatus === 1) {
         } else if (orderStatus === 1) {
             $("#status_success").show();
             $("#status_success").show();
-            if (invoiceStatus === 0) {
+            if (invoiceStatus === 0 && invoicePrice) {
                 $(".openinvoice").show();
                 $(".openinvoice").show();
-            } else if ((invoiceStatus === 1 || invoiceStatus === 2) && source_ !== 1) {
+            } else if (invoiceStatus === 1 || invoiceStatus === 2) {
                 $(".lookinvoice").show().on("click", function () {
                 $(".lookinvoice").show().on("click", function () {
                     checkinvoice({{.T.o.applybill_status}}, orderCode)
                     checkinvoice({{.T.o.applybill_status}}, orderCode)
                 });
                 });

+ 2 - 2
src/web/templates/pc/subAccount_orderDetail.html

@@ -217,9 +217,9 @@
                         if (source===""){
                         if (source===""){
                           //发票
                           //发票
                             if (r.data.is_backstage_order!==1){
                             if (r.data.is_backstage_order!==1){
-                                if (r.data.applybill_status === 0 && r.data.source !== 1) {
+                                if (r.data.applybill_status === 0 && r.data.invoice_price) {
                                     $(".openinvoice").css("display", "");
                                     $(".openinvoice").css("display", "");
-                                } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                                } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                         checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                         checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                     })
                                     })

+ 2 - 2
src/web/templates/pc/vip_orderDetail.html

@@ -302,9 +302,9 @@
                             //发票
                             //发票
                             // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
                             // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
                             if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
                             if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
-                                if (r.data.order.applybill_status === 0 && r.data.order.source !== 1) {
+                                if (r.data.order.applybill_status === 0 && r.data.order.invoice_price) {
                                     $(".openinvoice").css("display", "");
                                     $(".openinvoice").css("display", "");
-                                } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                                } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                     $(".lookinvoice").css("display", "").on("click", function () {
                                         checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                         checkinvoice(r.data.applybill_status, orderCode)//查看发票
                                     })
                                     })

+ 8 - 5
src/web/templates/weixin/commonPay/bidfile/bidfiledetail.html

@@ -184,10 +184,10 @@
 
 
                 var pay_again = ""
                 var pay_again = ""
                 //发票
                 //发票
-                if (r.data.applybill_status === 0) {
+                if (r.data.applybill_status === 0 &&  r.data.invoice_price) {
                     //已支付未申请发票
                     //已支付未申请发票
                     pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
                     pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
-                } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                } else if ( r.data.invoice_show) {
                     //已支付已申请发票
                     //已支付已申请发票
                     pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                     pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                 }
                 }
@@ -332,9 +332,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status === 1) {
             if (data.status === 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/front/invoice/cantInvoice";
+                // window.location.href = "/front/invoice/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
         })
         })
     }
     }
@@ -356,7 +358,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 8 - 5
src/web/templates/weixin/commonPay/integral/integralDetail.html

@@ -190,10 +190,10 @@
     
     
                     var pay_again = ""
                     var pay_again = ""
                     //发票
                     //发票
-                    if (r.data.applybill_status === 0) {
+                    if (r.data.applybill_status === 0 && res.data.invoice_price) {
                         //已支付未申请发票
                         //已支付未申请发票
                         pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
                         pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
-                    } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                    } else if (r.data.invoice_show) {
                         //已支付已申请发票
                         //已支付已申请发票
                         pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                         pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                     }
                     }
@@ -350,9 +350,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status === 1) {
             if (data.status === 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/front/invoice/cantInvoice";
+                // window.location.href = "/front/invoice/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
         })
         })
     }
     }
@@ -374,7 +376,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 6 - 3
src/web/templates/weixin/commonPay/medical/orderDetail.html

@@ -995,9 +995,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", { "order_code": orderCode }, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", { "order_code": orderCode }, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/front/invoice/cantInvoice";
+                // window.location.href = "/front/invoice/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
             ;
             ;
         })
         })
@@ -1021,7 +1023,8 @@
             return
             return
         }
         }
         orderCode = getParam("orderCode")
         orderCode = getParam("orderCode")
-        window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     /******* 获取url参数(正则)********/
     /******* 获取url参数(正则)********/

+ 8 - 5
src/web/templates/weixin/dataExport/dataExport_toOrderDetail.html

@@ -550,9 +550,9 @@
                                 $(".order-main").before(finish_html)
                                 $(".order-main").before(finish_html)
 
 
                                 var html = '<div class="j-button-group">'
                                 var html = '<div class="j-button-group">'
-                                if (r.data.applybill_status === 0) {
+                                if (r.data.applybill_status === 0 && r.data.invoice_price) {
                                     html += '<button class="j-button-cancel" onclick="invoiceAdd(\'' + r.data.order_code + '\')">开发票</button><button class="j-button-confirm" id="buytwo" onclick="payAgain(\'' + r.data.order_code + '\')">再次购买</button>'
                                     html += '<button class="j-button-cancel" onclick="invoiceAdd(\'' + r.data.order_code + '\')">开发票</button><button class="j-button-confirm" id="buytwo" onclick="payAgain(\'' + r.data.order_code + '\')">再次购买</button>'
-                                } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                                } else if ( r.data.invoice_show) {
                                     html += '<button class="j-button-cancel" onclick= checkinvoice(\'' + r.data.order_code + '\',' + r.data.applybill_status + ')>查看发票</button><button class="j-button-confirm" id="buytwo" onclick="payAgain(\'' + r.data.order_code + '\')">再次购买</button>'
                                     html += '<button class="j-button-cancel" onclick= checkinvoice(\'' + r.data.order_code + '\',' + r.data.applybill_status + ')>查看发票</button><button class="j-button-confirm" id="buytwo" onclick="payAgain(\'' + r.data.order_code + '\')">再次购买</button>'
                                 }
                                 }
                             } else {
                             } else {
@@ -643,7 +643,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/front/invoice/check_invoice.html?order_code=" + order_code
+        // window.location.href = "/front/invoice/check_invoice.html?order_code=" + order_code
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + order_code
     }
     }
 
 
     function invoiceAdd(order_code) {
     function invoiceAdd(order_code) {
@@ -656,9 +657,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": order_code}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": order_code}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + order_code;
+                // window.location.href = "/front/invoice/showpage?order_code=" + order_code;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + order_code;
             } else {
             } else {
-                window.location.href = "/front/invoice/cantInvoice";
+                // window.location.href = "/front/invoice/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + order_code;
             }
             }
             ;
             ;
         })
         })

+ 2 - 1
src/web/templates/weixin/invoice/cantInvocie.html

@@ -152,7 +152,8 @@
         }
         }
         checkInvoice.init()
         checkInvoice.init()
         function replaceInvoice(){
         function replaceInvoice(){
-            window.location.href = "/front/invoice/showpage?order_code="+order_code+"&c=1"
+            // window.location.href = "/front/invoice/showpage?order_code="+order_code+"&c=1"
+            window.location.href = "/jy_mobile/invoice/Invoicing?order_code="+order_code+"&type=Replace"
         }
         }
         function isWeixinBrower () {
         function isWeixinBrower () {
             if(navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1){
             if(navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1){

+ 8 - 5
src/web/templates/weixin/member/aiForecastPackdetail.html

@@ -221,10 +221,10 @@
                     if (source===""){
                     if (source===""){
                       var pay_again = ""
                       var pay_again = ""
                       //发票
                       //发票
-                      if (r.data.applybill_status === 0) {
+                      if (r.data.applybill_status === 0 && r.data.invoice_price) {
                           //已支付未申请发票
                           //已支付未申请发票
                           pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
                           pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
-                      } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                      } else if (r.data.invoice_show) {
                           //已支付已申请发票
                           //已支付已申请发票
                           pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                           pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                       }
                       }
@@ -366,9 +366,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status === 1) {
             if (data.status === 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/front/invoice/cantInvoice";
+                // window.location.href = "/front/invoice/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
         })
         })
     }
     }
@@ -390,7 +392,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 10 - 7
src/web/templates/weixin/member/memberdetail.html

@@ -395,16 +395,16 @@
                   var pay_again = ""
                   var pay_again = ""
                   //有效周期
                   //有效周期
                   $(".line_cycle").css("display", "");
                   $(".line_cycle").css("display", "");
-                  if (r.data.applybill_status === 0) {
+                  if (r.data.applybill_status === 0 && r.data.invoice_price) {
                       //已支付未申请发票
                       //已支付未申请发票
                       pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
                       pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
-                  } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                  } else if ( r.data.invoice_show) {
                       //已支付已申请发票
                       //已支付已申请发票
                       pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                       pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                   }
                   }
-                  if(r.data.source !== 1){
+                 
                      $('.j-footer').show().html(pay_again);
                      $('.j-footer').show().html(pay_again);
-                  }
+                  
 
 
                 }else{
                 }else{
                   var buchongbaoHtml = '';
                   var buchongbaoHtml = '';
@@ -616,9 +616,11 @@
         }
         }
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status === 1) {
             if (data.status === 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/front/invoice/cantInvoice";
+                // window.location.href = "/front/invoice/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
         })
         })
     }
     }
@@ -640,7 +642,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 8 - 5
src/web/templates/weixin/member/subAccountDetail.html

@@ -231,10 +231,10 @@
                 var pay_again = ""
                 var pay_again = ""
                 //发票
                 //发票
                 if (source === "") {
                 if (source === "") {
-                  if (r.data.applybill_status === 0) {
+                  if (r.data.applybill_status === 0 && r.data.invoice_price) {
                       //已支付未申请发票
                       //已支付未申请发票
                       pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
                       pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
-                  } else if ((r.data.applybill_status === 1 || r.data.applybill_status === 2) && r.data.source !== 1) {
+                  } else if (r.data.invoice_show) {
                       //已支付已申请发票
                       //已支付已申请发票
                       pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                       pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.applybill_status + ")'>查看发票</button>"
                   }
                   }
@@ -374,9 +374,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status === 1) {
             if (data.status === 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/front/invoice/cantInvoice";
+                // window.location.href = "/front/invoice/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
         })
         })
     }
     }
@@ -398,7 +400,8 @@
             });
             });
             return
             return
         }
         }
-        window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     function formatTime(t) {
     function formatTime(t) {

+ 11 - 9
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -746,20 +746,19 @@
 
 
                     //发票
                     //发票
                     // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
                     // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
-                    if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
                         var pay_again = ""
                         var pay_again = ""
-                        if (r.data.order.applybill_status === 0) {
+                        if ((r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04') && r.data.order.applybill_status === 0 && r.data.order.invoice_price) {
                             //已支付未申请发票
                             //已支付未申请发票
                             pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
                             pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
-                        } else if ((r.data.order.applybill_status === 1 || r.data.order.applybill_status === 2) && r.data.order.source !== 1) {
+                        } else if ( r.data.order.invoice_show) {
                             //已支付已申请发票
                             //已支付已申请发票
                             pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.order.applybill_status + ")'>查看发票</button>"
                             pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.order.applybill_status + ")'>查看发票</button>"
                         }
                         }
-                        if(r.data.order.source !== 1){
+                        
                           $('.j-footer').show().html(pay_again)
                           $('.j-footer').show().html(pay_again)
-                         }
+                         
 
 
-                    }
+                    
                     if (r.data.order.billingMode==0){
                     if (r.data.order.billingMode==0){
                        $(".j-footer").hide();//隐藏开发票
                        $(".j-footer").hide();//隐藏开发票
                     }
                     }
@@ -977,9 +976,11 @@
         // });
         // });
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
         $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
             if (data.status == 1) {
             if (data.status == 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                // window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             } else {
             } else {
-                window.location.href = "/front/invoice/cantInvoice";
+                // window.location.href = "/front/invoice/cantInvoice";
+                window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode;
             }
             }
             ;
             ;
         })
         })
@@ -1003,7 +1004,8 @@
             return
             return
         }
         }
         orderCode = getParam("orderCode")
         orderCode = getParam("orderCode")
-        window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        // window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        window.location.href = "/jy_mobile/invoice/viewInvoice?order_code=" + orderCode
     }
     }
 
 
     /******* 获取url参数(正则)********/
     /******* 获取url参数(正则)********/