浏览代码

Merge branch 'dev4.6.3.4' of http://192.168.3.207:8080/qmx/jy into dev4.6.3.4

wangshan 3 年之前
父节点
当前提交
ee7957cd3e
共有 31 个文件被更改,包括 586 次插入403 次删除
  1. 2 1
      config_formal/subscribepay_172.17.4.183/invoice.json
  2. 2 1
      config_formal/subscribepay_2_172.17.145.180/invoice.json
  3. 12 0
      src/jfw/modules/app/src/web/staticres/jyapp/invoice/css/invoicing.css
  4. 1 2
      src/jfw/modules/app/src/web/templates/big-member/page_ent_portrait.html
  5. 8 3
      src/jfw/modules/app/src/web/templates/big-member/page_landingPage.html
  6. 146 125
      src/jfw/modules/app/src/web/templates/invoice/invoicing.html
  7. 1 1
      src/jfw/modules/bigmember/src/entity/marketAnalysis/customized_analysis.go
  8. 1 0
      src/jfw/modules/subscribepay/src/config/config.go
  9. 2 1
      src/jfw/modules/subscribepay/src/invoice.json
  10. 65 0
      src/jfw/modules/subscribepay/src/service/invoice.go
  11. 0 1
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  12. 二进制
      src/web/staticres/big-member/image/new_big_index/new-top-bg.png
  13. 1 1
      src/web/staticres/common-module/collection/js/ent_portrait.js
  14. 1 1
      src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js
  15. 6 6
      src/web/staticres/dataExport/css/payment_order.css
  16. 15 8
      src/web/staticres/electronic_invoice/css/invoice.css
  17. 12 0
      src/web/staticres/electronic_invoice/js/invoice.js
  18. 1 1
      src/web/staticres/frontRouter/pc/solution/js/pc-collect-solution-info.js
  19. 13 0
      src/web/staticres/invoice/css/invoicing.css
  20. 1 1
      src/web/staticres/js/pc-collect-bid-info.js
  21. 1 1
      src/web/staticres/js/pc-collect-user-info.js
  22. 4 4
      src/web/templates/big-member/pc/page_buy_commit.html
  23. 3 3
      src/web/templates/big-member/pc/page_index.html
  24. 2 0
      src/web/templates/order/pc/paySuccess.html
  25. 25 18
      src/web/templates/pc/createOrderPage.html
  26. 25 19
      src/web/templates/pc/dataPack/createOrderForDataPackage.html
  27. 17 2
      src/web/templates/pc/invoice.html
  28. 2 3
      src/web/templates/pc/subscribe_new.html
  29. 28 38
      src/web/templates/structuredata/pc/index.html
  30. 188 161
      src/web/templates/weixin/invoice/invoicing.html
  31. 1 1
      src/web/templates/weixin/tabbar.html

+ 2 - 1
config_formal/subscribepay_172.17.4.183/invoice.json

@@ -4,5 +4,6 @@
   "tax_policy": "0",
   "invoice_nature": "0",
   "invoice_interface_address": "http://172.17.4.183:8804",
-  "code": "3040205000000000000"
+  "code": "3040205000000000000",
+  "invoice_switch": true
 }

+ 2 - 1
config_formal/subscribepay_2_172.17.145.180/invoice.json

@@ -4,5 +4,6 @@
   "tax_policy": "0",
   "invoice_nature": "0",
   "invoice_interface_address": "http://172.17.4.183:8804",
-  "code": "3040205000000000000"
+  "code": "3040205000000000000",
+  "invoice_switch": true
 }

+ 12 - 0
src/jfw/modules/app/src/web/staticres/jyapp/invoice/css/invoicing.css

@@ -205,3 +205,15 @@
 input:disabled{
   background-color: #FFFFFF;
 }
+.jy-alert .weui-dialog__hd {
+  padding: 16px 24px 0;
+  text-align: center;
+}
+.jy-alert .weui-dialog__title{
+  font-weight: 600;
+  text-align: center;
+  font-size: .4rem;
+}
+.jy-alert .weui-dialog__bd{
+  text-align: justify;
+}

+ 1 - 2
src/jfw/modules/app/src/web/templates/big-member/page_ent_portrait.html

@@ -226,8 +226,7 @@
           <template #title>
             <span :class="{bidinfo:!hasOnePower}">中标分析</span>
             <span v-if="isShowUpTip" class="bid_upgrade">升级</span>
-            <span v-if="(hasOnePower && surplus && isVip)" class="bid_surplus">剩余:${entvisit.total -
-              entvisit.usage}</span>
+            <span v-if="(hasOnePower && surplus && isVip)" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
           </template>
           <div v-if="!showContacts" style="margin-top: .24rem;">
             <div style="background: #fff;padding: .24rem .32rem 0;">

+ 8 - 3
src/jfw/modules/app/src/web/templates/big-member/page_landingPage.html

@@ -48,6 +48,11 @@
       .btn_buy {
           font-size: 0;
       }
+      .xiugai{
+          font-size: 0.36rem;    
+          font-weight: bold; 
+          line-height: 0.8rem; 
+      }
     </style>
     <script>
       try {
@@ -153,14 +158,14 @@
         </div>
       </div>
     </div>
-    <div class="j-footer " v-show="isCantrial" style="background-color: #1A1A2A">
+    <div class="j-footer " v-show="isCantrial" style="background-color: #1A1A2A;">
       <div class="j-button-group btbt">
         <div class="buy_btn" v-if="onlyBuy">
           <div class="sevendays j-btn" @click="exper_fun()">
-            <div data-need-bind-phone  style="color: #FAE7CA">立即体验</div>
+            <div data-need-bind-phone class="xiugai" style="color: #FAE7CA">立即体验</div>
           </div>
           <div class="j-button-now j-btn" @click="linkBuy('sj',6)" >
-            <div data-need-bind-phone style="color: #1A1A2A">点击购买</div>
+            <div data-need-bind-phone class="xiugai" style="color: #1A1A2A">点击购买</div>
           </div>
         </div>
         <div class="buy_btn" v-else>

+ 146 - 125
src/jfw/modules/app/src/web/templates/invoice/invoicing.html

@@ -134,57 +134,124 @@
         var applybill_status = ""
         var sys_err = ""
         var c = {{.T.c}}
-            $(function () {
-                $.ajax({
-                    url:"/jypay/invoice/show",
-                    type:"POST",
-                    data:{"order_code":order_code},
-                    success:function (r) {
-                        if(r.status == "fail"){
-                            if (r.datas != ""){
-                                applybill_status = r.datas.applybill_status
-                                product_name = r.datas.product_type
-                                if (product_name == "历史数据"){  //历史数据
-                                    $(".user-phone").attr("value",r.datas.user_phone)
-                                    $(".user-mail").attr("value",r.datas.user_mail)
-									invoice.phoneStatus = true;
-									invoice.emailStatus = true;
-									$(".j-button-confirm").removeAttr("disabled")
-                                }
-                                if (r.datas.applybill_status == 1){
-                                    $(".j-footer").hide();
-                                    $(".v-cell-input").attr("disabled","disabled");
-                                    $(".invoice-title").unbind("click");
-                                }
+        $(function () {
+          switchInvoice()
+          // 发票功能是否开启
+          function switchInvoice() {
+            $.ajax({
+                url: '/jypay/invoice/switch?t=' + Date.now(),
+                type: "GET",
+                success: function(res) {
+                  if (res.code === '1001') {
+                    $('.j-button-confirm').attr('disabled',true)
+                    return weui.alert(res.messge, {
+                        title: '温馨提醒',
+                        className: 'jy-alert',
+                        buttons: [{
+                          label: '我知道了',
+                          onClick: function(){ 
+                            history.back()
+                          }
+                        }]
+                    })
+                  } else {
+                    showData()
+                  }
+                },
+                fail: function(err) {
+                  console.log(err)
+                }
+            })
+          }
+          function showData () {
+            $.ajax({
+                url:"/jypay/invoice/show",
+                type:"POST",
+                data:{"order_code":order_code},
+                success:function (r) {
+                    if(r.status == "fail"){
+                        if (r.datas != ""){
+                            applybill_status = r.datas.applybill_status
+                            product_name = r.datas.product_type
+                            if (product_name == "历史数据"){  //历史数据
+                                $(".user-phone").attr("value",r.datas.user_phone)
+                                $(".user-mail").attr("value",r.datas.user_mail)
+                                invoice.phoneStatus = true;
+                                invoice.emailStatus = true;
+                                $(".j-button-confirm").removeAttr("disabled")
+                            }
+                            if (r.datas.applybill_status == 1){
+                                $(".j-footer").hide();
+                                $(".v-cell-input").attr("disabled","disabled");
+                                $(".invoice-title").unbind("click");
+                            }
+                        }
+                    }else{
+                        applybill_status = r.data.invoice_status,
+                        product_name = r.data.product_type
+                        if (r.data.invoice_status == -1){
+                            sys_err = -1
+                            if (r.data.invoice_type == "单位"){
+                                $('.company-cell').show()
+                                $('.invoice-value').text("单位")
+                                $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                $(".company_name").attr("value",r.data.company_name)
+                                $(".user-phone").attr("value",r.data.phone)
+                                $(".user-mail").attr("value",r.data.mail)
+                                invoice.phoneStatus = true;
+                                invoice.emailStatus = true;
+                                invoice.cnameStatus = true;
+                                invoice.codeStatus = true;
+                                $(".j-button-confirm").removeAttr("disabled")
+                            }else{
+                                $('.invoice-value').text("个人")
+                                $(".user-phone").attr("value",r.data.phone)
+                                $(".user-mail").attr("value",r.data.mail)
+                                invoice.phoneStatus = true;
+                                invoice.emailStatus = true;
+                                $(".j-button-confirm").removeAttr("disabled")
                             }
                         }else{
-                            applybill_status = r.data.invoice_status,
-                            product_name = r.data.product_type
-                            if (r.data.invoice_status == -1){
-                                sys_err = -1
-                                if (r.data.invoice_type == "单位"){
-                                    $('.company-cell').show()
-                                    $('.invoice-value').text("单位")
-                                    $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                    $(".company_name").attr("value",r.data.company_name)
-                                    $(".user-phone").attr("value",r.data.phone)
-                                    $(".user-mail").attr("value",r.data.mail)
-                                    invoice.phoneStatus = true;
-                                    invoice.emailStatus = true;
-                                    invoice.cnameStatus = true;
-                                    invoice.codeStatus = true;
-                                    $(".j-button-confirm").removeAttr("disabled")
+                            if (product_name == "历史数据"){
+                                if (r.data.invoice_changed == 1){
+                                    if (r.data.invoice_type == "单位"){
+                                        $('.company-cell').show()
+                                        $('.invoice-value').text("单位")
+                                        $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                        $(".company_name").attr("value",r.data.company_name)
+                                        $(".user-phone").attr("value",r.data.phone)
+                                        $(".user-mail").attr("value",r.data.mail)
+                                        $(".v-cell-input").attr("disabled", "disabled");
+                                        $(".invoice-title").unbind("click");
+                                        $(".j-footer").hide()
+                                    }else{
+                                        $('.invoice-value').text("个人")
+                                        $(".user-phone").attr("value",r.data.phone)
+                                        $(".user-mail").attr("value",r.data.mail)
+                                        $(".v-cell-input").attr("disabled", "disabled");
+                                        $(".invoice-title").unbind("click");
+                                        $(".j-footer").hide()
+                                    }
                                 }else{
-                                    $('.invoice-value').text("个人")
-                                    $(".user-phone").attr("value",r.data.phone)
-                                    $(".user-mail").attr("value",r.data.mail)
-                                    invoice.phoneStatus = true;
-                                    invoice.emailStatus = true;
-                                    $(".j-button-confirm").removeAttr("disabled")
-                                }
-                            }else{
-                                if (product_name == "历史数据"){
-                                    if (r.data.invoice_changed == 1){
+                                    if (c==1){
+                                        if (r.data.invoice_type == "单位"){
+                                            /* $('.company-cell').show()
+                                            $('.invoice-value').text("单位")
+                                            $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                            $(".company_name").attr("value",r.data.company_name)
+                                            $(".user-phone").attr("value",r.data.phone)
+                                            $(".user-mail").attr("value",r.data.mail)*/
+                                            $('.invoice-value').text("个人")
+                                            $(".user-phone").attr("value",r.data.phone)
+                                            $(".user-mail").attr("value",r.data.mail)
+                                        }else{
+
+                                            $('.invoice-value').text("个人")
+                                            $(".user-phone").attr("value",r.data.phone)
+                                            $(".user-mail").attr("value",r.data.mail)
+
+                                        }
+                                    }else{
                                         if (r.data.invoice_type == "单位"){
                                             $('.company-cell').show()
                                             $('.invoice-value').text("单位")
@@ -203,49 +270,34 @@
                                             $(".invoice-title").unbind("click");
                                             $(".j-footer").hide()
                                         }
-                                    }else{
-                                        if (c==1){
-                                            if (r.data.invoice_type == "单位"){
-    /*                                            $('.company-cell').show()
-                                                $('.invoice-value').text("单位")
-                                                $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                                $(".company_name").attr("value",r.data.company_name)
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)*/
-                                                $('.invoice-value').text("个人")
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                            }else{
-
-                                                $('.invoice-value').text("个人")
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-
-                                            }
-                                        }else{
-                                            if (r.data.invoice_type == "单位"){
-                                                $('.company-cell').show()
-                                                $('.invoice-value').text("单位")
-                                                $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                                $(".company_name").attr("value",r.data.company_name)
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                                $(".v-cell-input").attr("disabled", "disabled");
-                                                $(".invoice-title").unbind("click");
-                                                $(".j-footer").hide()
-                                            }else{
-                                                $('.invoice-value').text("个人")
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                                $(".v-cell-input").attr("disabled", "disabled");
-                                                $(".invoice-title").unbind("click");
-                                                $(".j-footer").hide()
-                                            }
-                                        }
+                                    }
 
+                                }
+                            }else{
+                                if (r.data.invoice_changed == 1){
+                                    if (r.data.invoice_type == "单位"){
+                                        $('.company-cell').show()
+                                        $('.invoice-value').text("单位")
+                                        $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                        $(".company_name").attr("value",r.data.company_name)
+                                        $(".user-phone").attr("value",r.data.phone)
+                                        $(".user-mail").attr("value",r.data.mail)
+                                        $(".v-cell-input").attr("disabled", "disabled");
+                                        $(".invoice-title").unbind("click");
+                                        $(".j-footer").hide()
+                                    }else{
+                                        $('.invoice-value').text("个人")
+                                        $(".user-phone").attr("value",r.data.phone)
+                                        $(".user-mail").attr("value",r.data.mail)
+                                        $(".v-cell-input").attr("disabled", "disabled");
+                                        $(".invoice-title").unbind("click");
+                                        $(".j-footer").hide()
                                     }
                                 }else{
-                                    if (r.data.invoice_changed == 1){
+                                    if (c==1){
+                                        $('.invoice-value').text("个人")
+                                        $('.company-cell').hide()
+                                    }else{
                                         if (r.data.invoice_type == "单位"){
                                             $('.company-cell').show()
                                             $('.invoice-value').text("单位")
@@ -264,45 +316,18 @@
                                             $(".invoice-title").unbind("click");
                                             $(".j-footer").hide()
                                         }
-                                    }else{
-                                        if (c==1){
-                                            $('.invoice-value').text("个人")
-                                            $('.company-cell').hide()
-
-
-
-                                        }else{
-                                            if (r.data.invoice_type == "单位"){
-                                                $('.company-cell').show()
-                                                $('.invoice-value').text("单位")
-                                                $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                                $(".company_name").attr("value",r.data.company_name)
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                                $(".v-cell-input").attr("disabled", "disabled");
-                                                $(".invoice-title").unbind("click");
-                                                $(".j-footer").hide()
-                                            }else{
-                                                $('.invoice-value').text("个人")
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                                $(".v-cell-input").attr("disabled", "disabled");
-                                                $(".invoice-title").unbind("click");
-                                                $(".j-footer").hide()
-                                            }
-                                        }
-
                                     }
 
                                 }
-                            }
 
+                            }
                         }
+
                     }
-                })
+                }
             })
-
-
+          }
+        })
         var invoice = {
             reg:{
                 tel:/^1[3456789]{1}\d{9}$/,
@@ -518,7 +543,6 @@
             // 社会信用代码校验
             checkCode:function(){
                 var that = this;
-
                 $('input[name="code"]').on('blur',function(){
                     if ($(this).val() == ''){
                         that.codeStatus = false;
@@ -550,7 +574,6 @@
                 })
             },
             // 提交
-
             submitHandle:function(){
                 var that = this
                 $('.j-button-confirm').on('click',function(){
@@ -591,7 +614,6 @@
 
                     }
                     // 个人发票提交
-
                     if (isHidden) {
                         if(that.phoneStatus && that.emailStatus){
                             $.ajax({
@@ -626,14 +648,13 @@
                                 className: 'j-toast-icon',
                                 callback: function(){
                                   if(c!=""){
-                                     window.location.href = '/jyapp/front/invoice/check_invoice.html?cc=replaceInv&order_code='+order_code
+                                    window.location.href = '/jyapp/front/invoice/check_invoice.html?cc=replaceInv&order_code='+order_code
                                     }else{
                                       window.location.href = '/jyapp/front/invoice/check_invoice.html?order_code='+order_code
                                     }
                                 }
                             });
                         }
-
                     }
                 })
             }

+ 1 - 1
src/jfw/modules/bigmember/src/entity/marketAnalysis/customized_analysis.go

@@ -11,7 +11,7 @@ import (
 
 const (
 	query_aggs_sortprice       = `"sortprice_ranges": {"range":{"field":"sortprice","ranges":[%s]},"aggs":{"sum_sortprice":{"sum":{"field":"sortprice"}}}}`
-	aggs_area                  = `"area_distribution": {"terms": {"field": "area"},"aggs": {"area_amount": {"sum": {"field": "sortprice"}},"area_total": {"filter": {}}}}`
+	aggs_area                  = `"area_distribution": {"terms": {"field": "area","size": 40},"aggs": {"area_amount": {"sum": {"field": "sortprice"}},"area_total": {"filter": {}}}}`
 	query_top10                = `,"sort": [{"sortprice": "desc"}],"from": 0,"size": 10`
 	aggs_area_amounttop3       = `"area_amount_top3":{"terms":{"field":"area","exclude":["全国"],"order":[{"area_amount":"desc"}],"size":3},"aggs":{"area_amount":{"sum":{"field":"sortprice"}},"winner_top":{"terms":{"field":"entidlist","exclude": ["-"],"order":[{"area_winner_amount":"desc"}],"size":3},"aggs":{"area_winner_amount":{"sum":{"field":"sortprice"}}}}}}`
 	aggs_area_counttop3        = `"area_count_top3":{"terms":{"field":"area","exclude":["全国"],"order":[{"area_count":"desc"}],"size":3},"aggs":{"area_count":{"filter":{}},"winner_top":{"terms":{"field":"entidlist","exclude": ["-"],"order":[{"area_winner_count":"desc"}],"size":3},"aggs":{"area_winner_count":{"filter":{}}}}}}`

+ 1 - 0
src/jfw/modules/subscribepay/src/config/config.go

@@ -131,6 +131,7 @@ type Invoice struct {
 	Tax_policy                string
 	Invoice_interface_address string
 	Code                      string
+	Invoice_switch            bool
 }
 
 type entnicheConfig struct {

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

@@ -4,5 +4,6 @@
   "tax_policy": "0",
   "invoice_nature": "0",
   "invoice_interface_address": "http://192.168.3.14:7081",
-  "code": "3040205000000000000"
+  "code": "3040205000000000000",
+  "invoice_switch": true
 }

+ 65 - 0
src/jfw/modules/subscribepay/src/service/invoice.go

@@ -23,6 +23,7 @@ import (
 type Invoice struct {
 	*xweb.Action
 	addinvoice      xweb.Mapper `xweb:"/invoice/add"`      //开发票
+	invoiceswitch   xweb.Mapper `xweb:"/invoice/switch"`   //发票开关
 	showinvoice     xweb.Mapper `xweb:"/invoice/show"`     //查看发票
 	callbackinvoice xweb.Mapper `xweb:"/invoice/callback"` //开发票回调
 	replaceinvoice  xweb.Mapper `xweb:"/invoice/replace"`  //换发票
@@ -100,6 +101,70 @@ func init() {
 	email_format = string(bs)
 }
 
+func (this *Invoice) Invoiceswitch() {
+	if config.InvoiceConfig.Invoice_switch {
+		this.ServeJson(map[string]interface{}{
+			"code": "1000",
+		})
+	} else {
+		//更新数据 用于回显
+		userId := qutil.ObjToString(this.GetSession("userId"))
+		order_code := this.GetString("order_code")
+		applyBill_company := this.GetString("company")
+		//获取数据
+		applyBill_type := this.GetString("invoice_type") //个人 单位
+		my_email := this.GetString("email")
+		phone_num := this.GetString("phone_num")
+		code := strings.ToUpper(this.GetString("id_num")) //纳税人识别号
+		data := make(map[string]interface{})
+		dataexport_data := make(map[string]interface{})
+		if userId != "" && my_email != "" && phone_num != "" && order_code != "" {
+			if applyBill_type == "个人" {
+				data["taxpayer_identnum"] = ""
+				data["company_name"] = ""
+				dataexport_data["applyBill_type"] = 0
+				dataexport_data["applyBill_taxnum"] = ""
+				dataexport_data["applybill_company"] = ""
+			} else {
+				data["taxpayer_identnum"] = code
+				data["company_name"] = applyBill_company
+				dataexport_data["applyBill_taxnum"] = code
+				dataexport_data["applybill_company"] = applyBill_company
+				dataexport_data["applyBill_type"] = 1
+			}
+			dataexport_data["user_mail"] = my_email
+			dataexport_data["user_phone"] = phone_num
+			data["order_code"] = order_code
+			data["mail"] = my_email
+			data["phone"] = phone_num
+			data["invoice_type"] = applyBill_type
+			data["create_time"] = time.Now().Unix()
+			data["user_id"] = userId
+			status := util.Mysql.Find(dbname, map[string]interface{}{"order_code": order_code, "user_id": userId}, "", "create_time", 0, 0)
+			if len(*status) <= 0 {
+				//更新 "order_status,applybill_status,order_code,user_mail,applybill_type,applybill_company,user_phone,applybill_taxnum"
+				util.Mysql.Update("dataexport_order", map[string]interface{}{"order_code": order_code, "user_id": userId}, dataexport_data)
+			} else {
+				req := map[string]interface{}{
+					"order_code":      order_code,
+					"user_id":         userId,
+					"invoice_changed": 0,
+				}
+				if len(*status) > 1 {
+					req["id"] = (*status)[1]["id"]
+				} else {
+					req["id"] = (*status)[0]["id"]
+				}
+				util.Mysql.Update(dbname, req, data)
+			}
+		}
+		this.ServeJson(map[string]interface{}{
+			"code":   "1001",
+			"messge": "因第三方发票系统升级,开发票功能暂停使用。如有疑问,请咨询客服400-108-6670",
+		})
+	}
+}
+
 func (this *Invoice) Addinvoice() error {
 	defer qutil.Catch()
 	userId := qutil.ObjToString(this.GetSession("userId"))

+ 0 - 1
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -859,7 +859,6 @@ func (o *OrderListDetails) CommonDetail(bigm int, fields string) (data, time map
 					} else {
 						if bigm == 0 || bigm == 1 {
 							data["cycle"] = filter_map["cycle"]
-						} else if bigm == 0 {
 							data["level"] = filter_map["level"]
 							comboid := qutil.IntAll(filter_map["comboId"])
 							combo := util.Mysql.FindOne("bigmember_combo", map[string]interface{}{"id": comboid}, "s_name", "")

二进制
src/web/staticres/big-member/image/new_big_index/new-top-bg.png


+ 1 - 1
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -690,7 +690,7 @@ var vNode = {
                 _this.portrait = 'winnerVip'
               }
               // 新版超级订阅用户获取访问量
-              if (res.data.viper && (_this.conf.isMember <= 0 || res.data.power.indexOf(4) == -1)) {
+              if (res.data.viper && (res.data.memberStatus <= 0 || res.data.power.indexOf(4) == -1)) {
                 _this.getEntVisits()
               }
 	            //免费用户体验权限

+ 1 - 1
src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js

@@ -497,7 +497,7 @@ var vm = new Vue({
             _this.form.phone = res.data.phone ? res.data.phone : ''
             _this.form.mail = res.data.mail ? res.data.mail : ''
             _this.form.companyName = res.data.company ? res.data.company : ''
-            _this.form.branch = res.data.branch
+            _this.form.branch = res.data.branch || ''
             if (res.data.position) {
               if (jobJson.indexOf(res.data.position) == -1) {
                 // _this.form.job = '其他'

+ 6 - 6
src/web/staticres/dataExport/css/payment_order.css

@@ -107,36 +107,36 @@ body {
     padding: 20px 30px;
 }
 
-.info.pay-infotitle {
+#pay .inner .infotitle {
     padding-bottom: 18px;
     border-bottom: 1px solid #ccc;
     margin-bottom: 15px;
 }
 
-.info.pay-infotitle span {
+#pay .inner .infotitle span {
     color: #1D1D1D;
     font-size: 16px;
 }
 
-.info.pay-infotitle span i {
+#pay .inner .infotitle span i {
     font-size: 20px;
     color: #2CB7CA;
     margin: 0 2px;
 }
 
-.info.pay-infotitle em {
+#pay .inner .infotitle em {
     font-size: 12px;
     color: #888888;
     margin-left: 20px;
 }
 
-.info.pay-infotitle a {
+#pay .inner .infotitle a {
     color: #2CB7CA;
     margin-left: 20px;
     cursor: pointer;
 }
 
-.info.pay-infotitle a span {
+#pay .inner .infotitle a span {
     color: #2CB7CA;
 }
 

+ 15 - 8
src/web/staticres/electronic_invoice/css/invoice.css

@@ -216,39 +216,46 @@ input[type="number"] {
   color: #fff;
 }
 
-#ruleModal .modal-header {
+#ruleModal .modal-header,
+#switchModal .modal-header{
   padding: 32px 15px 24px;
   border-bottom: 0;
 }
 
-#ruleModal .modal-content {
+#ruleModal .modal-content,
+#switchModal .modal-content {
   max-width: 540px;
 }
 
-#ruleModal .modal-title {
+#ruleModal .modal-title,
+#switchModal .modal-title {
   font-size: 18px;
   line-height: 24px;
   color: #1D1D1D;
   text-align: center;
 }
 
-#ruleModal .modal-body {
+#ruleModal .modal-body,
+#switchModal .modal-body {
   padding: 0 30px;
 }
 
-#ruleModal .modal-body .text {
+#ruleModal .modal-body .text,
+#switchModal .modal-body .text {
   font-size: 14px;
   line-height: 24px;
   color: #1D1D1D;
 }
 
-#ruleModal .modal-footer {
+#ruleModal .modal-footer,
+#switchModal .modal-footer {
   border-top: 0;
   text-align: center;
   padding: 32px 15px;
 }
 
-#ruleModal .modal-footer .btn-default {
+#ruleModal .modal-footer .btn-default,
+#switchModal .modal-footer .btn-default  {
   width: 132px;
   height: 46px;
   background: #2CB7CA;
@@ -256,4 +263,4 @@ input[type="number"] {
   border: 0;
   color: #fff;
   outline: 0;
-}
+}

+ 12 - 0
src/web/staticres/electronic_invoice/js/invoice.js

@@ -121,6 +121,18 @@ $(function () {
         $('.unit_invoice').hide()
     }
     initSelect();
+    // 查询是否可以开发票
+    $.ajax({
+      url: '/jypay/invoice/switch',
+      type: "GET",
+      success: function(res) {
+        if (res.code === '1001') {
+          // 不能开票
+          $('#switchModal').modal('show').find('.text').text(res.messge)
+          return 
+        }
+      }
+    })
     // 提交
     $('.submit_btn').click(function(){
 		var order_code =$(".order_code").text();

+ 1 - 1
src/web/staticres/frontRouter/pc/solution/js/pc-collect-solution-info.js

@@ -379,7 +379,7 @@ var vmSolution = new Vue({
             _this.form.name = res.data.name ? res.data.name : ''
             _this.form.phone = res.data.phone ? res.data.phone : '' 
             _this.form.companyName = res.data.company ? res.data.company : ''
-            _this.form.branch = res.data.branch
+            _this.form.branch = res.data.branch || ''
             if (res.data.position) {
               if (jobJson.indexOf(res.data.position) == -1) {
                 // _this.form.job = '其他'

+ 13 - 0
src/web/staticres/invoice/css/invoicing.css

@@ -205,4 +205,17 @@
 input:disabled{
   background-color: #FFFFFF;
   background: #fff;
+}
+
+.jy-alert .weui-dialog__hd {
+  padding: 16px 24px 0;
+  text-align: center;
+}
+.jy-alert .weui-dialog__title{
+  font-weight: 600;
+  text-align: center;
+  font-size: .4rem;
+}
+.jy-alert .weui-dialog__bd{
+  text-align: justify;
 }

+ 1 - 1
src/web/staticres/js/pc-collect-bid-info.js

@@ -407,7 +407,7 @@ var vmbid = new Vue({
             _this.form.name = res.data.name ? res.data.name : ''
             _this.form.phone = res.data.phone ? res.data.phone : '' 
             _this.form.companyName = res.data.company ? res.data.company : ''
-            _this.form.branch = res.data.branch
+            _this.form.branch = res.data.branch || ''
             if (res.data.position) {
               if (jobJson.indexOf(res.data.position) == -1) {
                 // _this.form.job = '其他'

+ 1 - 1
src/web/staticres/js/pc-collect-user-info.js

@@ -655,7 +655,7 @@ var vm = new Vue({
             _this.form.business = res.data.workScope ? res.data.workScope : ''
             _this.form.need = res.data.partnerNeeds ? res.data.partnerNeeds : ''
             _this.form.agreeChecked = res.data.agree == undefined ?  true : res.data.agree
-            _this.form.branch = res.data.branch
+            _this.form.branch = res.data.branch || ''
           }
         }
       })

+ 4 - 4
src/web/templates/big-member/pc/page_buy_commit.html

@@ -760,7 +760,7 @@
       }
       return leave
     }
-    // 是否el的一部分在可视区域
+    // 是否el的一部分在可视区域
     function isInViewport (el) {
       if (!el) return
       var offset = el.getBoundingClientRect()
@@ -769,7 +769,7 @@
       var offsetBottom = offset.bottom
 
       // 是否在可视区域
-      var inViewport = offsetTop <= window.innerHeight && offsetBottom >= 0
+      var inViewport = offsetTop <= window.innerHeight && offsetBottom >= x
       return inViewport
     }
     // 必须在$(function () {})中调用
@@ -779,7 +779,7 @@
       var mainFooter = $('.page--big--index .main_footer.basic-sticky')
       var stickyFooter = $('.sticky-footer')
 
-      var show = isDOMLeave(mainFooter[0])
+      var show = !isInViewport(mainFooter[0])
 
       if (show) {
         stickyFooter.show()
@@ -805,7 +805,7 @@
       // 表格顶部固定
       var tableHeaderDom = $(".table-header[data-sticky]")
       var tableHeaderChangeDom = $(".sticky-header[data-sticky-change]")
-      var tableMaxHeight = $(".jy-table").height() + $(".jy-table").offset().top - tableHeaderChangeDom.height()
+      var tableMaxHeight = $(".jy-table").height() + $(".jy-table").offset().top - 64 - tableHeaderChangeDom.height()
 
       if ($(window).scrollTop() > (tableHeaderDom.offset().top - 64) && $(window).scrollTop() < tableMaxHeight) {
         tableHeaderChangeDom.show()

+ 3 - 3
src/web/templates/big-member/pc/page_index.html

@@ -264,7 +264,7 @@
 <!-- 用户留资 -->
 <div id="vue-collect-user-info"></div>
 <div class="page--big--index">
-    <div class="w-box new-kong-dw" style="background-color: #EAEBF7;">
+    <div class="w-box new-kong-dw" style="background-color: #EAEBF7; overflow: hidden;">
         <img style="width: 1920px; margin-left: 50%; transform: translateX(-50%);" src='{{Msg "seo" "cdn"}}/big-member/image/new_big_index/new-top-bg.png' alt="">
         <div class="open-customer subpage-button gold btn-kong-new">咨询客服,了解详情</div>
     </div>
@@ -680,7 +680,7 @@
     <!--S-底部横幅-->
     <div class="w-box footer-banner" data-sticky-change>
         <div class="w1200">
-            <img style="width: 1152px;" src='{{Msg "seo" "cdn"}}/big-member/image/new_big_index/new-footer-banner.png' alt="" usemap="#map1" />
+            <img style="width: 1200px;" src='{{Msg "seo" "cdn"}}/big-member/image/new_big_index/new-footer-banner.png' alt="" usemap="#map1" />
             <map name="map1" style="cursor: pointer">
                 <area id="go-free-week1" data-need-bind-phone data-free-week shape="rect" coords="973,40,1134,85"  />
                 <!-- <area id="go-buy-18" data-need-bind-phone data-go-buy="0"  shape="rect" coords="950, 21, 1090, 67" /> -->
@@ -692,7 +692,7 @@
     </div>
     <div class="w-box footer-banner" data-sticky>
         <div class="w1200">
-            <img style="width: 1152px;" src='{{Msg "seo" "cdn"}}/big-member/image/new_big_index/new-footer-banner.png' alt="" usemap="#map2" />
+            <img style="width: 1200px;" src='{{Msg "seo" "cdn"}}/big-member/image/new_big_index/new-footer-banner.png' alt="" usemap="#map2" />
             <map name="map2" style="cursor: pointer">
                 <area id="go-free-week2"  data-need-bind-phone data-free-week shape="rect" coords="973,40,1134,85"  />
                 <!-- <area id="go-buy-19" data-need-bind-phone data-go-buy="0"  shape="rect" coords="950, 21, 1090, 67" /> -->

+ 2 - 0
src/web/templates/order/pc/paySuccess.html

@@ -98,6 +98,8 @@
                 <a class="check_order" href="/front/aiForecastPack/aiForecastPackDetail?order_code={{.T.orderCode}}">查看订单</a>
             {{else if eq .T.orderType "bidfile"}}
                 <a class="check_order" href="/front/bidfile/bidfileDetail?order_code={{.T.orderCode}}">查看订单</a>
+            {{else if eq .T.orderType "areapack"}}
+                <a class="check_order" href="/areaPack/pc/page/order?order_code={{.T.orderCode}}">查看订单</a>
             {{else if eq .T.orderType "filePack"}}
                 <a class="check_order" href="/front/file/packDetail?order_code={{.T.orderCode}}">查看订单</a>
             {{else if eq .T.orderType "integral"}}

+ 25 - 18
src/web/templates/pc/createOrderPage.html

@@ -1350,6 +1350,19 @@
         }
     }
 
+    // 是否el的一部分在可视区域
+    function isInViewport (el) {
+        if (!el) return
+        var offset = el.getBoundingClientRect()
+        var x = 64 // 头部偏移
+        var offsetTop = offset.top + x
+        var offsetBottom = offset.bottom
+
+        // 是否在可视区域
+        var inViewport = offsetTop <= window.innerHeight && offsetBottom >= x
+        return inViewport
+    }
+
     // 必须在$(function () {})中调用
     function windowScrollFn () {
         // refreshStickyInfo()
@@ -1357,33 +1370,27 @@
         // 判断xx是否处于可视区域
         var mainFooter = $('.info.main_footer')
         var stickyFooter = $('.sticky-footer')
-        var offset = mainFooter[0] && mainFooter[0].getBoundingClientRect()
-        var offsetTop = offset.top + 64
-        var offsetBottom = offset.bottom
-        var offsetHeight = offset.height
-        // 是否在可视区域
-        // window.innerHeight 视口高度
-        var inViewport = offsetTop <= window.innerHeight && offsetBottom >= 0
-        if (inViewport) {
-            // 在可视区域
-            // console.log('in')
-            stickyFooter.hide()
-        } else {
-            // 不在可视区域
-            // console.log('out')
-            stickyFooter.show()
 
+        var show = !isInViewport(mainFooter[0])
+
+        if (show) {
+            stickyFooter.show()
             // 吸底
             // 如果距离底部
             var bottomFooter = $('.j-bottom')
-            var ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            var ob = { top: 0 }
+                if (bottomFooter.length) {
+                ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            }
             // bottom出现在视口
             var bottom = window.innerHeight - ob.top
-            if (bottom > 0) {
-                stickyFooter.css({ bottom: bottom })
+            if (bottom > 0 && ob.top !== 0) {
+                stickyFooter.css({ bottom: parseInt(bottom) })
             } else {
                 stickyFooter.css({ bottom: 0 })
             }
+        } else {
+            stickyFooter.hide()
         }
     }
     $(window).on('scroll', windowScrollFn)

+ 25 - 19
src/web/templates/pc/dataPack/createOrderForDataPackage.html

@@ -513,40 +513,46 @@
         stickyInfoBox.find('.should_num').text($('.pc-coupon-w1200 .should_pay .text--money').text())
     }
 
+    // 是否el的一部分在可视区域
+    function isInViewport (el) {
+        if (!el) return
+        var offset = el.getBoundingClientRect()
+        var x = 64 // 头部偏移
+        var offsetTop = offset.top + x
+        var offsetBottom = offset.bottom
+
+        // 是否在可视区域
+        var inViewport = offsetTop <= window.innerHeight && offsetBottom >= x
+        return inViewport
+    }
+
     // 必须在$(function () {})中调用
     function windowScrollFn () {
-        // refreshStickyInfo()
         // 购买底部固定
         // 判断xx是否处于可视区域
         var mainFooter = $('.info.main_footer')
         var stickyFooter = $('.sticky-footer')
-        var offset = mainFooter[0] && mainFooter[0].getBoundingClientRect()
-        var offsetTop = offset.top + 64
-        var offsetBottom = offset.bottom
-        var offsetHeight = offset.height
-        // 是否在可视区域
-        // window.innerHeight 视口高度
-        var inViewport = offsetTop <= window.innerHeight && offsetBottom >= 0
-        if (inViewport) {
-            // 在可视区域
-            // console.log('in')
-            stickyFooter.hide()
-        } else {
-            // 不在可视区域
-            // console.log('out')
-            stickyFooter.show()
+        
+        var show = !isInViewport(mainFooter[0])
 
+        if (show) {
+            stickyFooter.show()
             // 吸底
             // 如果距离底部
             var bottomFooter = $('.j-bottom')
-            var ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            var ob = { top: 0 }
+                if (bottomFooter.length) {
+                ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            }
             // bottom出现在视口
             var bottom = window.innerHeight - ob.top
-            if (bottom > 0) {
-                stickyFooter.css({ bottom: bottom })
+            if (bottom > 0 && ob.top !== 0) {
+                stickyFooter.css({ bottom: parseInt(bottom) })
             } else {
                 stickyFooter.css({ bottom: 0 })
             }
+        } else {
+            stickyFooter.hide()
         }
     }
 </script>

+ 17 - 2
src/web/templates/pc/invoice.html

@@ -123,7 +123,7 @@
             <span>提交成功</span>
         </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-content">
 	            <div class="modal-header">
@@ -143,12 +143,26 @@
 	            </div>
 	        </div>
 	    </div>
+	  </div>
+    <div class="modal fade" id="switchModal" tabindex="-1" data-keyboard="false" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
+	    <div class="modal-dialog" style="max-width:400px;">
+	        <div class="modal-content">
+	            <div class="modal-header">
+	                <h4 class="modal-title" style="font-weight: 700;">温馨提醒</h4>
+	            </div>
+	            <div class="modal-body">
+	                <div class="text"></div>
+	            </div>
+	            <div class="modal-footer">
+	                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="history.back()">我知道了</button>
+	            </div>
+	        </div>
+	    </div>
 	</div>
     <!-- main END -->
 	{{include "/common/pcbottom.html"}}
 	{{include "/common/baiducc.html"}}
     <!-- footer -->
-    <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/jquery-2.1.4.min.js"></script>
     <script src="{{Msg "seo" "cdn"}}/common-module/public/js/city-picker.data.js"></script>
     <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/city/city-picker.js"></script>
     <!-- custom_select.js 为封装select控件 修改原生select样式 -->
@@ -156,6 +170,7 @@
     <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/invoice.js?v={{Msg "seo" "version"}}"></script>
 	<script>
 		  $(function(){
+        
 			  var order_mail = {{.T.mail}};
 			  var order_phone = {{.T.phone}};
 			  if(order_mail!==""&&order_mail!==null&&order_mail!==undefined){

+ 2 - 3
src/web/templates/pc/subscribe_new.html

@@ -45,7 +45,7 @@
       }
       .footer-banner {
           position: fixed;
-          z-index: 665;
+          z-index: 98;
           bottom: 0;
           left: 0;
           width: 100%;
@@ -584,8 +584,7 @@
             // 表格头部固定
             var tableHeaderDom = $('.sub-contrast')
             var tableHeaderChangeDom = $(".contrast-main-header[data-sticky-change]")
-            var tableMaxHeight = $(".contrast-main").height() + $(".contrast-main").offset().top - tableHeaderChangeDom.height()
-
+            var tableMaxHeight = $(".contrast-main").height() + $(".contrast-main").offset().top - 64 - tableHeaderChangeDom.height()
             if ($(window).scrollTop() > tableHeaderDom.offset().top && $(window).scrollTop() < tableMaxHeight) {
                 tableHeaderChangeDom.show()
             } else {

+ 28 - 38
src/web/templates/structuredata/pc/index.html

@@ -99,7 +99,7 @@
                 </div>
             </div>
             <div class="section-buttons">
-                <button class="action-button get-data-example  open-customer" data-id="structedData" style="width: 240px;">咨询客服,了解更多</button>
+                <button class="action-button get-data-example" data-id="structedData" style="width: 240px;">咨询客服,了解更多</button>
             </div>
         </div>
     </div>
@@ -294,6 +294,7 @@
 <script src='{{Msg "seo" "cdn"}}/common-module/pc-dialog/js/leave-info-dialog.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/structuredata/pc/js/index.js?v={{Msg "seo" "version"}}'></script>
 <script>
+    var needMoreAdShow = true
     $(function () {
         $("#backTop").remove();
         haslogin({{.T.logid}});
@@ -303,43 +304,6 @@
         if (source!=null){
             typ = typ + "-" + source;
         }
-        // $("#data_example").on("click",function(){
-        //     try {
-        //         _hmt.push(['_trackEvent',typ, 'click', "点击查看数据实例"]);
-        //     } catch (e) {
-        //         console.log('未初始化百度统计', e)
-        //     }
-        //     window.open("/front/structed/getpreview", '_blank')
-        // })
-
-        // $('.bottom_btn').on('click', function(){
-        //     var className=$(this).attr("class");
-        //     var baidutj="";
-        //     if((className.indexOf("consult"))>-1){ //立即咨询1
-        //         baidutj="立即咨询-1";
-        //     } else if ((className.indexOf("experience"))>-1){//抢鲜体验
-        //         baidutj="抢先体验结构化数据";
-        //     } else if ((className.indexOf("canfirst"))>-1){ //立即咨询2
-        //         baidutj="立即咨询-2";
-        //     } else if ((className.indexOf("company"))>-1){ //立即使用
-        //         baidutj="立即使用";
-        //     }
-        //     if (loginflag){
-        //         var href='/front/structed/pc_info.html'
-        //         var source = getParam("source");
-        //         if (source!=null){
-        //             href+="?source="+source;
-        //         }
-        //         try {
-        //             _hmt.push(['_trackEvent',typ, 'click', baidutj]);
-        //         } catch (e) {
-        //             console.log('未初始化百度统计', e);
-        //         }
-        //         window.open(href, '_blank')
-        //     }else{
-        //         $("#bidLogin").modal("show");
-        //     }
-        // })
 
         // 获取数据样例
         $('.get-data-example, .get-data-example-button').on('click', function () {
@@ -367,9 +331,35 @@
         // 底部ad
         $('.i-need-more .closed').on('click', function () {
             $('.i-need-more').fadeOut()
+            needMoreAdShow = false
         })
+
+        windowScrollFn()
+        $(window).on('scroll', windowScrollFn)
+        $(window).on('resize', windowScrollFn)
     })
 
+    function windowScrollFn () {
+        // 底部横幅固定
+        var stickyFooter = $('.i-need-more')
+        if (needMoreAdShow) {
+            // 吸底
+            // 如果距离底部
+            var bottomFooter = $('.j-bottom')
+            var ob = { top: 0 }
+                if (bottomFooter.length) {
+                ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            }
+            // bottom出现在视口
+            var bottom = window.innerHeight - ob.top
+            if (bottom > 0 && ob.top !== 0) {
+                stickyFooter.css({ bottom: parseInt(bottom) })
+            } else {
+                stickyFooter.css({ bottom: 0 })
+            }
+        }
+    }
+
     /******* 获取url参数(正则)********/
     function getParam(name) {
       var search = document.location.search;

+ 188 - 161
src/web/templates/weixin/invoice/invoicing.html

@@ -140,178 +140,205 @@
         var sys_err = ""
         var c = {{.T.c}}
             $(function () {
-                $.ajax({
-                    url:"/jypay/invoice/show",
-                    type:"POST",
-                    data:{"order_code":order_code},
-                    success:function (r) {
-                        if(r.status == "fail"){
-                            if (r.datas != ""){
-                                applybill_status = r.datas.applybill_status
-								product_name = r.datas.product_type
-								if (product_name == "历史数据"){  //历史数据
-                                    $(".user-phone").attr("value",r.datas.user_phone)
-                                    $(".user-mail").attr("value",r.datas.user_mail)
-									invoice.phoneStatus = true;
-									invoice.emailStatus = true;
-									$("#commit").removeAttr("disabled")
-                                }
-                                if (r.datas.applybill_status == 1){
-                                    $(".j-footer").hide();
-                                    $(".v-cell-input").attr("disabled","disabled");
-                                    $(".invoice-title").unbind("click");
-                                }
-                            }
-                        }else{
-                            applybill_status = r.data.invoice_status,
-                            product_name = r.data.product_type
-                            if (r.data.invoice_status == -1){
-                                sys_err = -1
-                                if (r.data.invoice_type == "单位"){
-                                    $('.company-cell').show()
-                                    $('.invoice-value').text("单位")
-                                    $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                    $(".company_name").attr("value",r.data.company_name)
-                                    $(".user-phone").attr("value",r.data.phone)
-                                    $(".user-mail").attr("value",r.data.mail)
-                                    invoice.phoneStatus = true;
-                                    invoice.emailStatus = true;
-                                    invoice.cnameStatus = true;
-                                    invoice.codeStatus = true;
-                                    $(".j-button-confirm").removeAttr("disabled")
-
-                                }else{
-                                    $('.invoice-value').text("个人")
-                                    $(".user-phone").attr("value",r.data.phone);
-                                    $(".user-mail").attr("value",r.data.mail);
-                                    invoice.phoneStatus = true;
-                                    invoice.emailStatus = true;
-                                    $("#commit").removeAttr("disabled")
+              switchInvoice()
+               // 发票功能是否开启
+                function switchInvoice() {
+                  $.ajax({
+                      url: '/jypay/invoice/switch?t=' + Date.now(),
+                      type: "GET",
+                      success: function(res) {
+                        if (res.code === '1001') {
+                          $('.j-button-confirm').attr('disabled',true)
+                          return weui.alert(res.messge, {
+                              title: '温馨提醒',
+                              className: 'jy-alert',
+                              buttons: [{
+                                label: '我知道了',
+                                onClick: function(){ 
+                                  history.back()
                                 }
-                            }else{
-                                if (product_name == "历史数据"){
-                                    if (r.data.invoice_changed == 1){
-                                        if (r.data.invoice_type == "单位"){
-                                            $('.company-cell').show()
-                                            $('.invoice-value').text("单位")
-                                            $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                            $(".company_name").attr("value",r.data.company_name)
-                                            $(".user-phone").attr("value",r.data.phone)
-                                            $(".user-mail").attr("value",r.data.mail)
-                                            $(".v-cell-input").attr("disabled", "disabled");
-                                            $(".invoice-title").unbind("click");
-                                            $(".j-footer").hide()
-                                        }else{
-                                            $('.invoice-value').text("个人")
-                                            $(".user-phone").attr("value",r.data.phone)
-                                            $(".user-mail").attr("value",r.data.mail)
-                                            $(".v-cell-input").attr("disabled", "disabled");
-                                            $(".invoice-title").unbind("click");
-                                            $(".j-footer").hide()
-                                        }
-                                    }else{
-                                        if (c==1){
-                                            if (r.data.invoice_type == "单位"){
-                                                /*$('.company-cell').show()
-                                                $('.invoice-value').text("单位")
-                                                $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                                $(".company_name").attr("value",r.data.company_name)
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)*/
-                                                $('.invoice-value').text("个人")
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                            }else{
-                                                $('.invoice-value').text("个人")
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-
-                                            }
-                                        }else{
-                                            if (r.data.invoice_type == "单位"){
-                                                $('.company-cell').show()
-                                                $('.invoice-value').text("单位")
-                                                $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                                $(".company_name").attr("value",r.data.company_name)
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                                $(".v-cell-input").attr("disabled", "disabled");
-                                                $(".invoice-title").unbind("click");
-                                                $(".j-footer").hide()
-                                            }else{
-
-                                                $('.invoice-value').text("个人")
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                                $(".v-cell-input").attr("disabled", "disabled");
-                                                $(".invoice-title").unbind("click");
-                                                $(".j-footer").hide()
-                                            }
-                                        }
+                              }]
+                          })
+                        } else {
+                          showData()
+                        }
+                      },
+                      fail: function(err) {
+                        console.log(err)
+                      }
+                  })
+                }
+                function showData () {
+                    $.ajax({
+                      url:"/jypay/invoice/show",
+                      type:"POST",
+                      data:{"order_code":order_code},
+                      success:function (r) {
+                          if(r.status == "fail"){
+                              if (r.datas != ""){
+                                  applybill_status = r.datas.applybill_status
+                                  product_name = r.datas.product_type
+                                  if (product_name == "历史数据"){  //历史数据
+                                      $(".user-phone").attr("value",r.datas.user_phone)
+                                      $(".user-mail").attr("value",r.datas.user_mail)
+                                      invoice.phoneStatus = true;
+                                      invoice.emailStatus = true;
+                                      $("#commit").removeAttr("disabled")
+                                  }
+                                  if (r.datas.applybill_status == 1){
+                                      $(".j-footer").hide();
+                                      $(".v-cell-input").attr("disabled","disabled");
+                                      $(".invoice-title").unbind("click");
+                                  }
+                              }
+                          }else {
+                              applybill_status = r.data.invoice_status,
+                              product_name = r.data.product_type
+                              if (r.data.invoice_status == -1){
+                                  sys_err = -1
+                                  if (r.data.invoice_type == "单位"){
+                                      $('.company-cell').show()
+                                      $('.invoice-value').text("单位")
+                                      $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                      $(".company_name").attr("value",r.data.company_name)
+                                      $(".user-phone").attr("value",r.data.phone)
+                                      $(".user-mail").attr("value",r.data.mail)
+                                      invoice.phoneStatus = true;
+                                      invoice.emailStatus = true;
+                                      invoice.cnameStatus = true;
+                                      invoice.codeStatus = true;
+                                      $(".j-button-confirm").removeAttr("disabled")
 
-                                    }
-                                }else{
-                                    if (r.data.invoice_changed == 1){
-                                        if (r.data.invoice_type == "单位"){
-                                            $('.company-cell').show()
-                                            $('.invoice-value').text("单位")
-                                            $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                            $(".company_name").attr("value",r.data.company_name)
-                                            $(".user-phone").attr("value",r.data.phone)
-                                            $(".user-mail").attr("value",r.data.mail)
-                                            $(".v-cell-input").attr("disabled", "disabled");
-                                            $(".invoice-title").unbind("click");
-                                            $(".j-footer").hide()
-                                        }else{
-                                            $('.invoice-value').text("个人")
-                                            $(".user-phone").attr("value",r.data.phone)
-                                            $(".user-mail").attr("value",r.data.mail)
-                                            $(".v-cell-input").attr("disabled", "disabled");
-                                            $(".invoice-title").unbind("click");
-                                            $(".j-footer").hide()
-                                        }
-                                    }else{
-                                        if (c==1){
+                                  }else{
+                                      $('.invoice-value').text("个人")
+                                      $(".user-phone").attr("value",r.data.phone);
+                                      $(".user-mail").attr("value",r.data.mail);
+                                      invoice.phoneStatus = true;
+                                      invoice.emailStatus = true;
+                                      $("#commit").removeAttr("disabled")
+                                  }
+                              }else{
+                                  if (product_name == "历史数据"){
+                                      if (r.data.invoice_changed == 1){
+                                          if (r.data.invoice_type == "单位"){
+                                              $('.company-cell').show()
+                                              $('.invoice-value').text("单位")
+                                              $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                              $(".company_name").attr("value",r.data.company_name)
+                                              $(".user-phone").attr("value",r.data.phone)
+                                              $(".user-mail").attr("value",r.data.mail)
+                                              $(".v-cell-input").attr("disabled", "disabled");
+                                              $(".invoice-title").unbind("click");
+                                              $(".j-footer").hide()
+                                          }else{
+                                              $('.invoice-value').text("个人")
+                                              $(".user-phone").attr("value",r.data.phone)
+                                              $(".user-mail").attr("value",r.data.mail)
+                                              $(".v-cell-input").attr("disabled", "disabled");
+                                              $(".invoice-title").unbind("click");
+                                              $(".j-footer").hide()
+                                          }
+                                      }else{
+                                          if (c==1){
+                                              if (r.data.invoice_type == "单位"){
+                                                  /*$('.company-cell').show()
+                                                  $('.invoice-value').text("单位")
+                                                  $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                                  $(".company_name").attr("value",r.data.company_name)
+                                                  $(".user-phone").attr("value",r.data.phone)
+                                                  $(".user-mail").attr("value",r.data.mail)*/
+                                                  $('.invoice-value').text("个人")
+                                                  $(".user-phone").attr("value",r.data.phone)
+                                                  $(".user-mail").attr("value",r.data.mail)
+                                              }else{
+                                                  $('.invoice-value').text("个人")
+                                                  $(".user-phone").attr("value",r.data.phone)
+                                                  $(".user-mail").attr("value",r.data.mail)
 
-                                            $('.company-cell').show()
-                                            $('.invoice-value').text("个人")
-                                            $('.company-cell').hide()
+                                              }
+                                          }else{
+                                              if (r.data.invoice_type == "单位"){
+                                                  $('.company-cell').show()
+                                                  $('.invoice-value').text("单位")
+                                                  $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                                  $(".company_name").attr("value",r.data.company_name)
+                                                  $(".user-phone").attr("value",r.data.phone)
+                                                  $(".user-mail").attr("value",r.data.mail)
+                                                  $(".v-cell-input").attr("disabled", "disabled");
+                                                  $(".invoice-title").unbind("click");
+                                                  $(".j-footer").hide()
+                                              }else{
 
+                                                  $('.invoice-value').text("个人")
+                                                  $(".user-phone").attr("value",r.data.phone)
+                                                  $(".user-mail").attr("value",r.data.mail)
+                                                  $(".v-cell-input").attr("disabled", "disabled");
+                                                  $(".invoice-title").unbind("click");
+                                                  $(".j-footer").hide()
+                                              }
+                                          }
 
+                                      }
+                                  }else{
+                                      if (r.data.invoice_changed == 1){
+                                          if (r.data.invoice_type == "单位"){
+                                              $('.company-cell').show()
+                                              $('.invoice-value').text("单位")
+                                              $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                              $(".company_name").attr("value",r.data.company_name)
+                                              $(".user-phone").attr("value",r.data.phone)
+                                              $(".user-mail").attr("value",r.data.mail)
+                                              $(".v-cell-input").attr("disabled", "disabled");
+                                              $(".invoice-title").unbind("click");
+                                              $(".j-footer").hide()
+                                          }else{
+                                              $('.invoice-value').text("个人")
+                                              $(".user-phone").attr("value",r.data.phone)
+                                              $(".user-mail").attr("value",r.data.mail)
+                                              $(".v-cell-input").attr("disabled", "disabled");
+                                              $(".invoice-title").unbind("click");
+                                              $(".j-footer").hide()
+                                          }
+                                      }else{
+                                          if (c==1){
 
-                                        }else{
-                                            if (r.data.invoice_type == "单位"){
-                                                $('.company-cell').show()
-                                                $('.invoice-value').text("单位")
-                                                $(".identification_number").attr("value",r.data.taxpayer_identnum)
-                                                $(".company_name").attr("value",r.data.company_name)
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                                $(".v-cell-input").attr("disabled", "disabled");
-                                                $(".invoice-title").unbind("click");
-                                                $(".j-footer").hide()
-                                            }else{
-                                                $('.invoice-value').text("个人")
-                                                $(".user-phone").attr("value",r.data.phone)
-                                                $(".user-mail").attr("value",r.data.mail)
-                                                $(".v-cell-input").attr("disabled", "disabled");
-                                                $(".invoice-title").unbind("click");
-                                                $(".j-footer").hide()
-                                            }
-                                        }
+                                              $('.company-cell').show()
+                                              $('.invoice-value').text("个人")
+                                              $('.company-cell').hide()
 
-                                    }
 
-                                }
-                                invoice.checkCName();
-                                invoice.checkCode();
-                            }
 
-                        }
+                                          }else{
+                                              if (r.data.invoice_type == "单位"){
+                                                  $('.company-cell').show()
+                                                  $('.invoice-value').text("单位")
+                                                  $(".identification_number").attr("value",r.data.taxpayer_identnum)
+                                                  $(".company_name").attr("value",r.data.company_name)
+                                                  $(".user-phone").attr("value",r.data.phone)
+                                                  $(".user-mail").attr("value",r.data.mail)
+                                                  $(".v-cell-input").attr("disabled", "disabled");
+                                                  $(".invoice-title").unbind("click");
+                                                  $(".j-footer").hide()
+                                              }else{
+                                                  $('.invoice-value').text("个人")
+                                                  $(".user-phone").attr("value",r.data.phone)
+                                                  $(".user-mail").attr("value",r.data.mail)
+                                                  $(".v-cell-input").attr("disabled", "disabled");
+                                                  $(".invoice-title").unbind("click");
+                                                  $(".j-footer").hide()
+                                              }
+                                          }
 
-                    }
-                })
+                                      }
 
+                                  }
+                                  invoice.checkCName();
+                                  invoice.checkCode();
+                              }
+                          }
+                      }
+                  })
+                }
             })
         var invoice = {
             reg:{

+ 1 - 1
src/web/templates/weixin/tabbar.html

@@ -33,7 +33,7 @@
 <script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/messageCenter/js/func.js?v={{Msg "seo" "version"}}'></script>
 <script>
-	var vm = new Vue({
+new Vue({
   el: '#tabMesg',
   delimiters: ['{', '}'],
   data: function () {