Răsfoiți Sursa

Merge branch 'dev/v4.9.21_tsz' of qmx/jy into feature/v4.9.21

汤世哲 1 an în urmă
părinte
comite
b3177d59d7

+ 8 - 12
src/web/templates/pc/aiPack_orderDetail.html

@@ -222,18 +222,14 @@
                             $(".pay_num").text(r.data.prepay_id);
                             $(".pay_num_p").css("display", "");
                         }
-                        if (source===""){
-                            if (r.data.is_backstage_order!==1){
-                                //发票
-                                if (r.data.is_can_invoice) {
-                                    $(".openinvoice").css("display", "");
-                                }
-                                if (r.data.invoice_show) {
-                                    $(".lookinvoice").css("display", "").on("click", function () {
-                                        checkinvoice(r.data.applybill_status, orderCode)
-                                    })
-                                }
-                            }
+                        //发票
+                        if (r.data.is_can_invoice) {
+                            $(".openinvoice").css("display", "");
+                        }
+                        if (r.data.invoice_show) {
+                            $(".lookinvoice").css("display", "").on("click", function () {
+                                checkinvoice(r.data.applybill_status, orderCode)
+                            })
                         }
                     }
                     if (r.data.order_status === -2) {

+ 18 - 4
src/web/templates/pc/check_invoice.html

@@ -53,7 +53,7 @@
             <a href="javascript:;" class="active">查看发票</a>
         </div>
         <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="white_shadow left_shadow" @click="clickArrow('left')" v-if="leftBtn">
             <div class="el-iconfont">
               <i class="el-icon-arrow-left"></i>
             </div>
@@ -67,7 +67,7 @@
               </div>
             </div>
           </div>
-          <div class="white_shadow right_shadow" @click="clickArrow('right')" v-if="invoiceData.length > 6 && rightBtn">
+          <div class="white_shadow right_shadow" @click="clickArrow('right')" v-if="showRightBtn && rightBtn">
             <div class="el-iconfont">
               <i class="el-icon-arrow-right"></i>
             </div>
@@ -444,7 +444,8 @@
             loading: true,
             leftBtn: false,
             rightBtn: true,
-            invoice_text: ''
+            invoice_text: '',
+            showRightBtn: false
           }
         },
         created() {
@@ -452,6 +453,20 @@
         },
         mounted() {
           $('#check_invoice').show()
+          this.$nextTick(() => {
+            const checkInvoiceDisplay = () => {
+              let canhandleNum = 0
+              const itemAllWidth = $('.invoice_status_item').map(function() {
+                return $(this).outerWidth() + 12;
+              }).get();
+              this.showRightBtn = itemAllWidth.reduce((sum, width) => sum + width, 0) - 1200 > 0;
+              if (itemAllWidth.length === 0 && canhandleNum < 10) {
+                canhandleNum++
+                setTimeout(checkInvoiceDisplay, 50)
+              }
+            }
+            checkInvoiceDisplay()
+          })
         },
         methods: {
           // 联系客服
@@ -520,7 +535,6 @@
           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();

+ 7 - 10
src/web/templates/pc/medaratus_orderDetail.html

@@ -293,16 +293,13 @@
                                 $(".pay_num").text(r.data.transaction_id);
                             }
                             //发票
-                            // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
-                            if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
-                                if (r.data.is_can_invoice) {
-                                    $(".openinvoice").css("display", "");
-                                } 
-                                if (r.data.invoice_show) {
-                                    $(".lookinvoice").css("display", "").on("click", function () {
-                                        checkinvoice(r.data.applybill_status, orderCode)//查看发票
-                                    })
-                                }
+                            if (r.data.is_can_invoice) {
+                                $(".openinvoice").css("display", "");
+                            } 
+                            if (r.data.invoice_show) {
+                                $(".lookinvoice").css("display", "").on("click", function () {
+                                    checkinvoice(r.data.applybill_status, orderCode)//查看发票
+                                })
                             }
                         }
                     }

+ 12 - 20
src/web/templates/pc/member_orderDetail.html

@@ -340,10 +340,6 @@
                                 $(".pay_way_p").css("display", "");
 
                                 $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
-                                $(".openinvoice").css({
-                                    'background': '#EDEFF2',
-                                    'color': '#5F5E64'
-                                })
                             }
                         }
 
@@ -352,22 +348,18 @@
                           $(".pay_num").text(r.data.prepay_id);
                            $(".pay_num_p").show();
                         }
-                        if (source===""){
-                            if(r.data.is_backstage_order!==1){ //发票
-                                if (r.data.is_can_invoice) {
-                                    $(".openinvoice").css("display", "").on("click", function () {
-                                        // return false // 待可开发票时删除
-                                        window.open("/front/order/invoice/" + orderCode, '_self');
-                                    });
-                                }
-                                if (r.data.invoice_show) {
-                                    $(".lookinvoice").css("display", "").on("click", function () {
-                                        checkinvoice(r.data.applybill_status, orderCode)//查看发票
-                                    })
-                                }
-                            }
-
-                        }else{
+                        if (r.data.is_can_invoice) {
+                            $(".openinvoice").css("display", "").on("click", function () {
+                                // return false // 待可开发票时删除
+                                window.open("/front/order/invoice/" + orderCode, '_self');
+                            });
+                        }
+                        if (r.data.invoice_show) {
+                            $(".lookinvoice").css("display", "").on("click", function () {
+                                checkinvoice(r.data.applybill_status, orderCode)//查看发票
+                            })
+                        }
+                        if(source){
                           // 自定义大会员展示服务列表
                           var buchongbaoHtml = '';
                           var serversName = filterObj.serversName;

+ 0 - 2
src/web/templates/pc/myOrder.html

@@ -1383,8 +1383,6 @@
                 location.href = href
               }
               return
-            } else if (item.product_type === '大会员' && item.pay_way === 'transferAccounts') {
-              this.goShowTipForInvoice('请联系客服开票<br>客服热线:400-108-6670')
             } else {
               window.open("/front/order/invoice/" + item.order_code);
             }

+ 7 - 12
src/web/templates/pc/subAccount_orderDetail.html

@@ -214,18 +214,13 @@
 
                         if (r.data.prepay_id) $(".pay_num").text(r.data.prepay_id);
 
-                        if (source===""){
-                          //发票
-                            if (r.data.is_backstage_order!==1){
-                                if (r.data.is_can_invoice) {
-                                    $(".openinvoice").css("display", "");
-                                }
-                                if (r.data.invoice_show) {
-                                    $(".lookinvoice").css("display", "").on("click", function () {
-                                        checkinvoice(r.data.applybill_status, orderCode)//查看发票
-                                    })
-                                }
-                            }
+                        if (r.data.is_can_invoice) {
+                            $(".openinvoice").css("display", "");
+                        }
+                        if (r.data.invoice_show) {
+                            $(".lookinvoice").css("display", "").on("click", function () {
+                                checkinvoice(r.data.applybill_status, orderCode)//查看发票
+                            })
                         }
                     }
                     if (r.data.order_status === -2) {

+ 7 - 10
src/web/templates/pc/vip_orderDetail.html

@@ -300,16 +300,13 @@
                                 $(".pay_num").text(r.data.transaction_id);
                             }
                             //发票
-                            // 后台渠道为xdqd04(销售代下单)可以开发票,其他后台创建订单不可以开发票
-                            if (r.data.order.is_backstage_order!==1 || r.data.order.order_channel === 'xdqd04'){
-                                if (r.data.order.is_can_invoice) {
-                                    $(".openinvoice").css("display", "");
-                                }
-                                if (r.data.invoice_show) {
-                                    $(".lookinvoice").css("display", "").on("click", function () {
-                                        checkinvoice(r.data.applybill_status, orderCode)//查看发票
-                                    })
-                                }
+                            if (r.data.order.is_can_invoice) {
+                                $(".openinvoice").css("display", "");
+                            }
+                            if (r.data.invoice_show) {
+                                $(".lookinvoice").css("display", "").on("click", function () {
+                                    checkinvoice(r.data.applybill_status, orderCode)//查看发票
+                                })
                             }
                         }
                     }