|
@@ -455,12 +455,11 @@ $(function () {
|
|
|
}
|
|
|
|
|
|
// 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
|
|
|
- if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
|
|
|
var pay_again = ""
|
|
|
//发票
|
|
|
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>"
|
|
|
$(".invoice .invoicing").css("display", "");
|
|
|
$(".invoicing").on("click", function () {
|
|
@@ -479,7 +478,7 @@ $(function () {
|
|
|
}
|
|
|
} 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 >"
|
|
|
$(".invoice").css("display", "none");
|
|
|
}
|
|
@@ -495,10 +494,8 @@ $(function () {
|
|
|
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) {
|
|
|
$("#card-header-bg").addClass("bg cancel-bg")
|
|
|
$("#pageTitle").addClass("status")
|
|
@@ -780,7 +777,8 @@ function checkinvoice(flag) {
|
|
|
});
|
|
|
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"));
|
|
|
$.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode_}, function (data) {
|
|
|
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 {
|
|
|
- window.location.href = "/jyapp/front/cantInvoice";
|
|
|
+ // window.location.href = "/jyapp/front/cantInvoice";
|
|
|
+ window.location.href = "/jy_mobile/invoice/Invoicing?order_code=" + orderCode_;
|
|
|
}
|
|
|
- ;
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
|