瀏覽代碼

订单详情:订单被删除后显示头部为白色背景,黑色文字

cuiyalong 5 年之前
父節點
當前提交
9771e906d9

+ 248 - 33
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_order_detail.css

@@ -1,27 +1,45 @@
-   .j-header {
-  position: fixed;
+html, body {
+  height: 100%;
+}
+
+.j-header {
+  position: absolute;
   width: 100%;
+  justify-content: flex-start;
   background-color: transparent;
-  z-index: 99;
+  color: #fff;
 }
-   .j-header.jy-app-header {
-     background-color: transparent;
-   }
 
-   .j-header:after {
+.j-header:after {
   display: none;
 }
 
-   .j-header .header-left {
-  color: #fff;
+.j-header .header-left {
+  color: inherit;
 }
 
-   .j-header .left-title {
+.j-header .header-title {
+  left: 0;
   font-size: .4rem;
   padding-left: .16rem;
+  color: inherit;
 }
 
-   .j-body .bg {
+.j-header.bgc-f {
+  justify-content: space-between;
+  background-color: #fff;
+  color: inherit;
+}
+.j-header.bgc-f .header-left {
+  color: inherit;
+}
+.j-header.bgc-f .header-title {
+  font-weight: 400;
+  font-size: .36rem;
+}
+
+
+.j-body .bg {
   display: flex;
   flex-direction: column;
   align-items: center;
@@ -34,38 +52,38 @@
   text-align: center;
 }
 
-   .j-body .bg .status {
+.j-body .bg .status {
   font-size: .44rem;
   line-height: .64rem;
   color: #F7F9FA;
   font-weight: bold;
 }
 
-   .j-body .bg .remaining {
+.j-body .bg .remaining {
   padding-top: .16rem;
   font-size: .28rem;
   line-height: .4rem;
   color: #F7F9FA;
 }
 
-   .j-body .finish-bg {
+.j-body .finish-bg {
   background-image: url(/jyapp/images/myorder/finish-bg.png?v=51430);
 }
 
-   .j-body .cancel-bg {
+.j-body .cancel-bg {
   background-image: url(/jyapp/images/myorder/cancel-bg.png?v=51430);
 }
 
-   .j-body .nopay-bg {
+.j-body .nopay-bg {
   background-image: url(/jyapp/images/myorder/nopay-bg.png?v=51430);
 }
 
-   .j-body .order-main {
+.j-body .order-main {
   padding: 0 .24rem;
   margin-top: -0.8rem;
 }
 
-   .j-body .order-main .top {
+.j-body .order-main .top {
   display: flex;
   align-items: center;
   background-color: #fff;
@@ -73,31 +91,31 @@
   border-radius: .16rem;
 }
 
-   .j-body .order-main .top .order-img {
+.j-body .order-main .top .order-img {
   width: 1.08rem;
   height: 1.08rem;
   overflow: hidden;
 }
 
-   .j-body .order-main .top .order-img img {
+.j-body .order-main .top .order-img img {
   width: 100%;
   height: 100%;
 }
 
-   .j-body .order-main .top .order-name {
+.j-body .order-main .top .order-name {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   padding: 0 .24rem;
 }
 
-   .j-body .order-main .top .order-name .o-name {
+.j-body .order-main .top .order-name .o-name {
   font-size: .28rem;
   line-height: .4rem;
   color: #5F5E64;
 }
 
-   .j-body .order-main .top .order-name .o-price {
+.j-body .order-main .top .order-name .o-price {
   margin-top: .16rem;
   color: #171826;
   font-weight: bold;
@@ -105,21 +123,21 @@
   line-height: .52rem;
 }
 
-   .j-body .order-main .middle {
+.j-body .order-main .middle {
   margin-top: .32rem;
   padding: .32rem;
   border-radius: .16rem;
   background-color: #fff;
 }
 
-   .j-body .order-main .bottom {
+.j-body .order-main .bottom {
   margin: .32rem 0;
   padding: .32rem;
   border-radius: .16rem;
   background-color: #fff;
 }
 
-   .j-body .order-main .title {
+.j-body .order-main .title {
   padding-bottom: .24rem;
   font-size: .36rem;
   line-height: .52rem;
@@ -127,7 +145,7 @@
   font-weight: bold;
 }
 
-   .j-body .order-main .list .l-item {
+.j-body .order-main .list .l-item {
   display: flex;
   padding: .12rem 0;
   font-size: .26rem;
@@ -135,22 +153,219 @@
   color: #5F5E64;
 }
 
-   .j-body .order-main .list .l-item .label {
+.j-body .order-main .list .l-item .label {
   flex-shrink: 0;
   min-width: 1.32rem;
   color: #5F5E64;
 }
 
-   .j-body .order-main .list .l-item .value {
+.j-body .order-main .list .l-item .value {
   padding-left: .16rem;
   color: #171826;
 }
 
-   .j-body .order-main .voucher,    .j-body .order-main .qingdan {
+.j-body .order-main .voucher,    .j-body .order-main .qingdan {
   padding-left: .12rem;
   color: #2ABED1;
 }
 
+.j-footer {
+  display: none;
+}
+
+.zfje {
+	font-size: .32rem;
+	margin: 0 auto;
+}
+.stop {
+  overflow: hidden;
+  height: 100%;
+}
+
+.jymobile-setting-dialog {
+  font-size: .32rem;
+}
+
+.jymobile-setting-dialog .weui-dialog__hd {
+  padding: 0;
+  height: 0.82rem;
+  line-height: .82rem;
+  text-align: center;
+  background-color: #F5F4F9;
+}
+
+.jymobile-setting-dialog .weui-dialog__hd .weui-dialog__title {
+  font-size: .36rem;
+}
+
+.jymobile-setting-dialog .weui-dialog__bd {
+  padding: .37rem .1rem .38rem;
+  color: #1D1D1D;
+  font-size: .32rem;
+  text-align: center;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft {
+  display: flex;
+  padding: 0 0 .38rem 0;
+  text-align: center;
+  justify-content: space-around;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft:after {
+  border: none;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn {
+  display: flex;
+  flex: none;
+  align-items: center;
+  justify-content: center;
+  width: 1.72rem;
+  height: .72rem;
+  color: #fff;
+  font-size: .32rem;
+  vertical-align: center;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn_primary {
+  margin: 0;
+  margin-left: .3rem;
+  background-color: #2CB7CA;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn_default {
+  margin: 0;
+  margin-right: .3rem;
+  background-color: #BFBFC3;
+}
+
+.cancel_time{
+	font-size: 16px;
+	margin-left: 20px;
+}
+
+.pay_way .box {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  height: 4.9rem;
+  z-index: 9999;
+}
+.pay_way .box .box_hd {
+  padding: 0 .4rem;
+  height: .88rem;
+  line-height: .88rem;
+  background: #F4F4F9;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-pack: justify;
+  -ms-flex-pack: justify;
+  justify-content: space-between;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  border-bottom: 1px solid #eee;
+}
+
+.pay_way .box .box_bd p {
+  font-size: .32rem;
+}
+.pay_way .box .box_bd .zfb_label{
+margin-bottom:.38rem;
+}
+.pay_way .box .box_hd>h3 {
+  color: #1D1D1D;
+  font-size: .32rem;
+}
+.pay_way .box .box_hd .cancel {
+  color: #2cb7ca;
+  font-size: .32rem;
+}
+.pay_way .box .box_bd img {
+  width: .8rem;
+  height: .8rem;
+  margin-right: .3rem;
+}
+.pay_way .box .box_bd .wx_label, .pay_way .box .box_bd .zfb_label {
+  margin-top: .38rem;
+  padding: 0 .3rem;
+}
+
+.money_pay{
+  font-size: .50rem;
+  text-align: center;
+  height: 1rem;
+  line-height: 1rem;
+}
+.surePay{
+  font-size: .40rem;
+  text-align: center;
+  height: 1rem;
+  line-height: 1rem;
+  background-color: #2CB7CA;
+  color: #fff;
+  margin-top:  0.28rem;
+}
+
+.weui-cells {
+  margin-top: 0px !important;
+  background-color: #fff;
+  line-height: 1.47058824;
+  font-size: 17px;
+  overflow: hidden;
+  position: relative;
+}
+
+.weui-cell::before {
+  content: " ";
+  position: absolute;
+  left: 0;
+  top: 0;
+  right: 0;
+  height: 1px;
+  border-top: 0px solid #e5e5e5 !important;
+  border-top-color:
+  rgb(229, 229, 229);
+  border-top-style: solid;
+  border-top-width: 5px;
+  color:#e5e5e5;
+  -webkit-transform-origin: 0 0;
+  transform-origin: 0 0;
+  -webkit-transform: scaleY(.5);
+  transform: scaleY(.5);
+  left: 15px;
+  z-index: 2;
+}
+
+.pay_way .box .box_bd .weui-check:checked + .weui-icon-checked:before {
+  color: #2cb7ca;
+}
+
+.nothing{
+  height: 100%;
+	margin: 50% auto;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction:column;
+}
+.nothing img{
+  width: 120px;
+}
+.nothingDiv {
+	padding-top:0.42rem;
+	font-size:0.3rem;
+	color:#838384;
+}
+
+.person > p >span , .unit > p >span{
+	margin-bottom: .12rem;
+}
+
 .billing-list-container .weui-half-screen-dialog {
   display: flex;
   flex-direction: column;
@@ -371,9 +586,9 @@
 }
 
 .va-total-container .total-price {
-  font-weight: 700;
-  font-size: 0.32rem;
-  color: #fe737a;
+  font-weight: 400;
+  font-size: 0.36rem;
+  color: #FB483D;
 }
 
 .valuation_list {

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

@@ -0,0 +1,749 @@
+$(function () {
+  var canpay = true;
+  var orderCode = decodeURIComponent(getParam("orderCode"));
+  var pay_way = "wx_app";
+
+  if (!orderCode) {
+    weui.toast("订单号异常", {
+      duration: 2000,
+      className: 'custom-toast',
+    });
+  }
+
+  $(".orderCode").text(orderCode);
+
+  $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg", { "orderCode": orderCode }, function (r) {
+    $("body").css("visibility", "");
+    if (r.success) {
+      if (r.data.order.order_status == -1) {
+        $(".nothing").show();
+        $('.j-header').addClass('bgc-f').find('.header-title').text('我的订单')
+        $(".j-body").remove();
+      }
+      //下单时间
+      if (r.data.order.create_time) {
+        $(".prepayTime").text(r.data.order.create_time.replace("-", ".").replace("-", "."));
+      }
+      //产品类型
+      if (r.data.order.product_type) $(".productType").text(r.data.order.product_type);
+      if (r.data.order.original_price == 0) {
+        $(".productType").text(r.data.order.product_type + "(试用)");
+      }
+      //价格
+      $(".price").text("¥ " + r.data.order.original_price / 100 + "元");
+      //优惠码
+      if (r.data.order.isUsedActiveCode) {
+        $(".discount-container").removeClass("hide");
+      }
+      if (!r.data.order.isLiveActive) {
+        $(".origin-price-container").hide();
+      } else {
+        var originPrice = (r.data.order.original_price / 100 / parseFloat(activeDiscount)).toFixed(2);
+        $(".price-num").text(originPrice);
+        $(".bill-origin-price").css("display", "flex");
+      }
+
+      var areaText = "";
+      var industry_vip = "";
+      //订单条件
+      if (r.data.order.filter) {
+        var filterObj = JSON.parse(r.data.order.filter);
+        var newbuyset = filterObj.newBuyset;
+        if ((r.data.order.vip_type != 2) && (r.data.order.vip_type != 1)) {
+          if (!$.isEmptyObject(newbuyset)) {
+            var val = getnewbuyset(newbuyset);
+            areaText = val[0];
+            industry_vip = val[1];
+            $(".areaNum").text(areaText);
+            $(".industryNum").text(industry_vip);
+          } else {
+            //省份数 城市数
+            if (!$.isEmptyObject(filterObj.area)) {
+              var cityNum = 0;
+              var provinceNum = 0;
+              for (var i in filterObj.area) {
+                let citys = filterObj.area[i];
+                if (citys.length > 0) {
+                  cityNum += citys.length;
+                } else {
+                  provinceNum++;
+                }
+              }
+              var areaText = "";//1个省级区域、4个地市
+              if (provinceNum > 0) areaText = areaText + provinceNum + "个省级区域";
+              if (cityNum > 0) {
+                if (provinceNum > 0) areaText = areaText + "、"
+                areaText = areaText + cityNum + "个地市";
+              }
+              $(".areaNum").text(areaText);
+            } else {
+              $(".areaNum").text("全国");
+            }
+            //行业数
+            if (filterObj.industry.length != 0) {
+              $(".industryNum").text(filterObj.industry.length + "个行业");
+            } else {
+              $(".industryNum").text("全行业");
+            }
+          }
+        } else if (r.data.order.vip_type == 2) {
+          if (!$.isEmptyObject(newbuyset)) {
+            var val = getnewbuyset(newbuyset);
+            areaText = val[0];
+            industry_vip = val[1];
+            $(".areaNum").text(areaText);
+            $(".industryNum").text(industry_vip);
+          } else {
+            //升级订单 单独处理
+            if (!$.isEmptyObject(filterObj.addareacount)) {
+              if ((filterObj.addareacount.province == 0) && (filterObj.addareacount.city == 0)) {
+                areaText = "全国";
+              }
+              if ((filterObj.addareacount.province != 0) && (filterObj.addareacount.city == 0)) {
+                areaText = filterObj.addareacount.province + "个省级区域";
+              }
+              if ((filterObj.addareacount.province == 0) && (filterObj.addareacount.city != 0)) {
+                areaText = filterObj.addareacount.city + "个地市";
+              }
+              if ((filterObj.addareacount.province != 0) && (filterObj.addareacount.city != 0)) {
+                areaText = filterObj.addareacount.province + "个省级区域、" + filterObj.addareacount.city + "个地市";
+              }
+            } else {
+              areaText = "无";
+            }
+            $(".areaNum").text(areaText);
+            //行业
+            var industry_vip = "";
+            industry_vip = filterObj.addbuyerclasscount + "个行业";
+            if (filterObj.addbuyerclasscount == 0) {
+              industry_vip = "无";
+            }
+            if (filterObj.addbuyerclasscount == -1) {
+              industry_vip = "全行业";
+            }
+            $(".industryNum").text(industry_vip);
+          }
+
+        } else if (r.data.order.vip_type == 1) {
+          if (!$.isEmptyObject(newbuyset)) {
+            var val = getnewbuyset(newbuyset);
+            areaText = val[0];
+            industry_vip = val[1];
+            $(".areaNum").text(areaText);
+            $(".industryNum").text(industry_vip);
+          } else {
+            var renewal_market = 0; //续费市级地区
+            var buyset = filterObj.buyset;
+            if (buyset.areacount == -1) {
+              $(".areaNum").text("全国");
+            } else {
+              if (!$.isEmptyObject(buyset.citys)) {
+                for (var key in buyset.citys) {
+                  renewal_market += (buyset.citys[key]);
+                }
+              }
+              //
+              var areaText = "";
+              if ((buyset.areacount != 0) && (renewal_market != 0)) {
+                areaText = buyset.areacount + "个省级地区、" + renewal_market + "个地市";
+              } else if ((buyset.areacount == 0) && (renewal_market != 0)) {
+                areaText = renewal_market + "个地市";
+              } else if ((buyset.areacount != 0) && (renewal_market == 0)) {
+                areaText = buyset.areacount + "个省级地区";
+              }
+              $(".areaNum").text(areaText);
+            }
+            if (buyset.buyerclasscount == -1) {
+              $(".industryNum").text("全行业");
+            } else {
+              $(".industryNum").text(buyset.buyerclasscount + "个行业");
+            }
+          }
+        }
+
+      }
+
+      //周期
+      if ((r.data.order.vip_starttime != undefined) && (r.data.order.vip_endtime != undefined)) {
+        var start_time_vip = r.data.order.vip_starttime;
+        var end_time_vip = r.data.order.vip_endtime;
+        var start_time_arr = start_time_vip.split(" ")[0].split("-")
+        var end_time_arr = end_time_vip.split(" ")[0].split("-")
+        var start_year = start_time_arr[0];
+        var start_month = start_time_arr[1];
+        var end_year = end_time_arr[0];
+        var end_month = end_time_arr[1];
+        var year = 0;
+        var month = 0;
+        if (end_year > start_year) {
+          if (end_month > start_month) {
+            year = end_year - start_year;
+            month = end_month - start_month;
+          } else {
+            year = end_year - start_year - 1;
+            month = 12 + Number(end_month) - start_month;
+            if (month == 12) {
+              year = Number(year) + 1;
+              month = 0;
+            }
+          }
+        } else if (end_year === start_year) {
+          month = end_month - start_month;
+        }
+
+        if (year != 0 && month != 0) {
+          $(".cyclecount").text(year + "年" + month + "个月");
+        } else if (year !== 0 && month === 0) {
+          $(".cyclecount").text(year + "年");
+        } else if (year === 0 && month !== 0) {
+          $(".cyclecount").text(month + "个月");
+        }
+        if (filterObj.cycleunit == 1) {
+          $(".cyclecount").text(filterObj.cyclecount + "年")
+        } else if (filterObj.cycleunit == 2) {
+          $(".cyclecount").text(filterObj.cyclecount + "个月")
+        } else if (filterObj.cycleunit == 3) {
+          $(".cyclecount").text(filterObj.cyclecount + "天")
+        }
+      } else {
+        //未支付
+        if (filterObj.cycleunit == 1) {
+          $(".cyclecount").text(filterObj.cyclecount + "年")
+        } else if (filterObj.cycleunit == 2) {
+          $(".cyclecount").text(filterObj.cyclecount + "个月")
+        } else if (filterObj.cycleunit == 3) {
+          $(".cyclecount").text(filterObj.cyclecount + "天")
+        }
+      }
+
+
+      if (r.data.order.vip_type == 1) {
+        $(".productType").text(r.data.order.product_type + "(续费)");
+        $(".dyqy").text("续费区域:");
+        $(".dyhy").text("续费采购单位行业:");
+        $(".dyzq").text("续费周期:");
+      } else if (r.data.order.vip_type == 2) {
+        $(".productType").text(r.data.order.product_type + "(升级)");
+        if (filterObj.cycleunit == 1) {
+          $(".cyclecount").text(filterObj.cyclecount + "年")
+        } else if (filterObj.cycleunit == 2) {
+          $(".cyclecount").text(filterObj.cyclecount + "个月")
+        } else if (filterObj.cycleunit == 3) {
+          $(".cyclecount").text(filterObj.cyclecount + "天")
+        } else if (filterObj.cycleunit == -1) {
+          $(".cyclecount").text("不延期");
+        }
+        $(".dyqy").text("升级区域:");
+        $(".dyhy").text("升级采购单位行业:");
+        $(".dyzq").text("延长周期:");
+      } else {
+        if (filterObj.cycleunit == 1) {
+          $(".cyclecount").text(filterObj.cyclecount + "年")
+        } else if (filterObj.cycleunit == 2) {
+          $(".cyclecount").text(filterObj.cyclecount + "个月")
+        } else if (filterObj.cycleunit == 3) {
+          $(".cyclecount").text(filterObj.cyclecount + "天")
+        }
+      }
+
+      //升级续费
+      var fnewBuyset = filterObj.newBuyset;
+      if (!$.isEmptyObject(fnewBuyset)) {
+        //续费升级逻辑修改后判断是否不延期
+        if (filterObj.cycleunit == 0 && filterObj.cyclecount == 0) {
+          $(".cyclecount").text("不延期");
+        }
+      }
+      if (r.data.order.order_status == 0) {
+        //未支付
+        $("#card-header-bg").addClass("bg nopay-bg")
+        $("#pageTitle").addClass("status")
+        $("#pageTitle").text("待付款");
+        $(".remaining").show()
+        var order_create_time = r.data.order.create_time
+        order_create_time = order_create_time.replace(/-/g, '/')
+        var downtime = r.data.order.order_countdown.split("h")[0]
+        downtime = downtime * 60 * 60 * 1000
+        var t = setInterval(() => {
+          var nowtime = new Date()  //获取当前时间
+          endtime = new Date(order_create_time);  //定义结束时间
+          var lefttime = endtime.getTime() + downtime - nowtime.getTime() //距离结束时间的毫秒数
+          if (Math.floor(lefttime % 1000) <= 0) {
+            clearInterval(t)
+            $.ajax({
+              type: "post",
+              url: "/subscribepay/orderListDetails/deleteOrder",
+              data: {
+                "id": r.data.order.id,
+                "pageNum": 1,
+                "type": 1,
+                "cancel": "cancel"
+              },
+              dataType: 'json',
+              success: function () {
+                $(".nopay-bg h3").text("已取消")
+                $(".remaining").text("")
+                $(".nopay-bg").removeClass("nopay-bg").addClass("cancel-bg")
+                $(".j-footer").hide()
+              }
+            })
+          } else {
+            var hour = Math.floor(lefttime / (1000 * 60 * 60)),  //计算小时数
+              hour = hour < 10 ? '0' + hour : hour;
+            var minute = Math.floor(lefttime / (1000 * 60) % 60),  //计算分钟数
+              minute = minute < 10 ? '0' + minute : minute;
+            var seconds = Math.floor(lefttime / 1000 % 60);  //计算秒数
+            seconds = seconds < 10 ? '0' + seconds : seconds;
+            $(".remaining").text("剩余支付时间:" + hour + ":" + minute + ":" + seconds)
+          }
+        }, 1000)
+        $(".invoice").hide();//隐藏开发票
+        //支付方式
+        if (r.data.order.pay_way.indexOf("wx") > -1) {
+          //$(".line_payway").css("display","");
+          $("#wx").prop("checked", true);
+          $("#zfb").prop("checked", false);
+          $(".payWay").text("微信支付");
+          pay_way = "wx_app"
+        } else if (r.data.order.pay_way.indexOf("ali") > -1) {
+          $(".payWay").text("支付宝支付");
+          $("#wx").prop("checked", false);
+          $("#zfb").prop("checked", true);
+          pay_way = "ali_app"
+        }
+
+        var pay_now = "<button class=\"j-button-confirm\" style='width: 100%!important;' onclick=choosePayWay()>去支付</button>"
+        $(".j-footer").show().html(pay_now)
+        $(".button.align").css("display", "").on("click", function () {//显示去支付按钮
+          $("#pay_way").show();
+          if (localStorage.getItem(orderCode) == "wx") {
+            pay_way = "wx_app"
+            $("#wx").prop("checked", true);
+            $("#zfb").prop("checked", false);
+          } else if (localStorage.getItem(orderCode) == "ali") {
+            $("#wx").prop("checked", false);
+            $("#zfb").prop("checked", true);
+            pay_way = "ali_app"
+          }
+        })
+      } else if (r.data.order.order_status == 1) {
+        $("#card-header-bg").addClass("bg finish-bg")
+        $("#pageTitle").addClass("status")
+        $("#pageTitle").text("已完成");
+        //支付时间
+        $(".line_paytime").css("display", "");
+        if (r.data.order.pay_time) $(".payTime").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+        if (r.data.order.original_price == 0) {
+          $(".line_paytime").css("display", "none");
+        }
+
+        //有效周期
+        $(".line_cycle").css("display", "");
+        //有效日期
+        if (r.data.time.vip_starttime && r.data.time.vip_endtime) {
+          var vip_starttime = r.data.time.vip_starttime + "";
+          var vip_endtime = r.data.time.vip_endtime + "";
+          vip_starttime = vip_starttime.split(" ")[0].replace(/-/g, ".");
+          vip_endtime = vip_endtime.split(" ")[0].replace(/-/g, ".");
+          var serviceTime = vip_starttime + " - " + vip_endtime;
+          $(".serviceTime").text(serviceTime)
+        }
+
+        //支付方式
+        if (r.data.order.pay_way.indexOf("wx") > -1) {
+          $(".line_payway").css("display", "");
+          $(".payWay").text("微信支付");
+          pay_way = "wx_app"
+        } else if (r.data.order.pay_way.indexOf("ali") > -1) {
+          $(".payWay").text("支付宝支付");
+          $(".line_payway").css("display", "");
+          pay_way = "ali_app"
+        } else {//试用用户
+          $(".invoice").css("display", "none");
+          return
+        }
+
+
+
+        $(".line_transaction").css("display", "");
+        if (r.data.transaction_id) $(".transaction_id").text(r.data.transaction_id);
+        var pay_again = ""
+        //发票
+        if (r.data.order.applybill_status == 0) {
+          //已支付未申请发票
+          pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()' style='width: 100%!important;'>开发票</button>"
+          $(".invoice .invoicing").css("display", "");
+          $(".invoicing").on("click", function () {
+            var nowTimestamp = (new Date()).valueOf();
+            $.post("/subscribepay/orderListDetails/emailOperation?v=" + nowTimestamp, {}, function (r) {
+              if (r.success) {
+                //没有绑定邮箱
+                weuiDialog();
+              } else {
+                //绑定了邮箱
+                window.location.href = "/jyapp/front/myOrder/getOrderCode/" + orderCode;
+              }
+            })
+          });
+        } else {
+          //已支付已申请发票
+          pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice()' style='width: 100%!important;'>查看发票</button >"
+          $(".invoice").css("display", "none");
+          switch (r.data.order.applybill_type) {
+            case 0:
+              $(".person").css("display", "");
+              break;
+            case 1:
+              $(".unit").css("display", "");
+              $(".company_name").html(r.data.order.applybill_company);
+              $(".taxpayer_number").html(r.data.order.applybill_taxnum);
+              break;
+          }
+
+        }
+        $(".j-footer").show().html(pay_again)
+      } else if (r.data.order.order_status == -2) {
+        $("#card-header-bg").addClass("bg cancel-bg")
+        $("#pageTitle").addClass("status")
+        $("#pageTitle").text("已取消");
+        $(".invoice").css("display", "none");//隐藏开发票
+      }
+    }
+
+    //计价清单
+    var filterObj = JSON.parse(r.data.order.filter);
+    var upgradeSubtotail = filterObj.upgradeSubtotail;
+    if (upgradeSubtotail) {	//有则显示
+      $.ajax({
+        type: 'POST',
+        url: '/subscribepay/orderListDetails/getValuationList',
+        data: {
+          "order_code": orderCode
+        },
+        success: function (data) {
+          appendList(data.list, data.order_money);
+        }
+      });
+      $(".valuationList").show();
+      // 计算标准点击事件
+      $('.valuationList').on('click', function () {
+        pickerShow('.billing-list-container', true)
+        $("html,body").addClass("stop");
+      })
+      // 计算标准隐藏
+      $('.billing-list-container .dialog_hd__close').on('click', function () {
+        pickerShow('.billing-list-container', false)
+        $("html,body").removeClass("stop");
+      })
+      $('.weui-mask').on('click', function () {
+        pickerShow('.billing-list-container', false)
+        $("html,body").removeClass("stop");
+      })
+    }
+
+    //离开按钮
+    $(".cancel").click(function () {
+      $('.pay_way').hide(200)
+    });
+
+    /* 选择支付方式*/
+    $('input:radio[name="way"]').click(function () {
+      var checkValue = $('input:radio[name="way"]:checked').val();
+      if (checkValue == "微信支付") {
+        localStorage.setItem($(".order_code_vip").text(), "wx");
+        $("#wx").prop("checked", true);
+        $("#zfb").prop("checked", false);
+        pay_way = "wx_app";
+      } else {
+        localStorage.setItem($(".order_code_vip").text(), "ali");
+        $("#wx").prop("checked", false);
+        $("#zfb").prop("checked", true);
+        pay_way = "ali_app";
+      }
+    });
+
+    //确认支付
+    $("#pay").on("click", function () {
+      $(".loading_").show();
+      //vip支付;
+      if (!canpay) return
+      canpay = false;
+      $.post("/subscribepay/vipsubscribe/orderToPay", { "orderCode": orderCode, "pay_way": pay_way }, function (r) {
+        if (r.success) {
+          if (pay_way == "wx_app") {
+            JyObj.wxPay(r.data.res);
+          } else {
+            JyObj.aliPay(r.data.res);
+          }
+          $('.pay_way').hide(200)
+          canpay = true;
+          checkPaySuccess_vip(orderCode);
+        }
+      })
+    })
+
+  })
+
+  function formatEffectiveDate(strat, end) {
+    var startDate = new Date(strat * 1000);
+    var endDate = new Date(end * 1000);
+    return formatDate(startDate) + " - " + formatDate(endDate)
+  }
+  function formatDate(d) {
+    return (d.getFullYear()) + "." +
+      (Array(2).join(0) + (d.getMonth() + 1)).slice(-2) + "." +
+      (Array(2).join(0) + (d.getDate())).slice(-2);
+  }
+
+  function weuiDialog() {
+    weui.dialog({
+      title: '提示信息',
+      content: '您未绑定邮箱<br/>请绑定后再开发票',
+      className: 'jymobile-setting-dialog',// 设置弹框的类名
+      buttons: [
+        {
+          label: '去设置',
+          type: 'primary',
+          onClick: function () {
+            window.location.replace("/jyapp/front/myorder/myEmail?name=invoice&orderCode=" + orderCode);
+          }
+        },
+        {
+          label: '取消',
+          type: 'default',
+          onClick: function () {
+            console.log('取消')
+          }
+        }
+      ]
+    });
+  }
+
+  var interval_vip
+  //支付完成跳转 VIP订单
+  function checkPaySuccess_vip(order_vipcode) {
+    if (interval_vip) {
+      clearInterval(interval_vip)
+    }
+    $(".loading_").show();
+    interval_vip = setInterval(function () {
+      $.post("/jypay/isPaySuccess", { code: order_vipcode }, function (r) {
+        if (r.success) {
+          clearInterval(interval_vip);
+          $(".loading_").hide();
+          window.location.href = "/jyapp/vipsubscribe/toPaySuccessPage?orderCode=" + order_vipcode;
+        }
+      })
+    }, 3000)
+    $(".loading_").hide();
+  }
+
+  function PrefixInteger(num, n) {
+    return (Array(n).join(0) + num).slice(-n);
+  }
+  // 参数为结束时间戳
+  function setTimeFunc(endtime) {
+    var t = endtime - +new Date();
+    if (t <= 0) {
+      $(".button").hide();
+      $(".cancel_time").hide();
+      $("#pageTitle").html("已取消");
+    }
+    var days_ = PrefixInteger(parseInt(t / 1000 / 60 / 60, 10).toString(), 2)
+    var minutes_ = PrefixInteger(parseInt(t / 1000 / 60 % 60, 10).toString(), 2)
+    var seconds = PrefixInteger(parseInt(t / 1000 % 60, 10).toString(), 2)
+    $(".cancel_time").text("剩余" + days_ + ":" + minutes_ + ":" + seconds + " ");
+  }
+
+  //升级续费逻辑重写后的数据处理
+  function getnewbuyset(newBuyset) {
+    if (newBuyset.areacount != -1) {
+      var newcitys = newBuyset.newcitys;
+      var scatter = newcitys.length;//分布
+      var citynum = 0;
+      for (var k in newcitys) {
+        citynum += newcitys[k];
+      }
+      if (newBuyset.areacount > 0) {
+        areaText = newBuyset.areacount + "个省级区域";
+        if (citynum != 0) {
+          if (scatter > 1) {
+            areaText += "、" + citynum + "个地市(分布在" + scatter + "省内)";
+          } else {
+            areaText += "、" + citynum + "个地市";
+          }
+        }
+      } else {
+        if (scatter > 1) {
+          areaText = citynum + "个地市(分布在" + scatter + "省内)";
+        } else {
+          areaText = citynum + "个地市";
+        }
+      }
+    } else {
+      areaText = "全国";
+    }
+    var buyerclasscount = newBuyset.buyerclasscount;
+    if (buyerclasscount > 3) {
+      buyerclasscount = filterObj.industry.length;
+      industry_vip = "全行业(" + buyerclasscount + "个行业)";
+    } else {
+      industry_vip = buyerclasscount + "个行业";
+    }
+    if (buyerclasscount == -1) {
+      industry_vip = "全行业";
+    }
+    return [areaText, industry_vip]
+  }
+  // picker的显示隐藏
+  function pickerShow(selector, f) {
+    if (f) {
+      // 添加进场动画,并显示
+      $(selector).find('.weui-mask').removeClass('weui-animate-fade-out').addClass('weui-animate-fade-in')
+      $(selector).find('.weui-picker').removeClass('weui-animate-slide-down').addClass('weui-animate-slide-up')
+      $(selector).show(300);
+    } else {
+      // 添加离场动画,并隐藏
+      $(selector).find('.weui-mask').removeClass('weui-animate-fade-in').addClass('weui-animate-fade-out')
+      $(selector).find('.weui-picker').removeClass('weui-animate-slide-up').addClass('weui-animate-slide-down')
+      $(selector).hide(300);
+    }
+  }
+  var total_price = 0;
+  function appendList(list, money) {
+    var returnHtml = "";
+    for (var i = 0; i < list.length; i++) {
+      var showTime = ""
+      var start = new Date(list[i].startTime * 1000).pattern('yyyy-MM-dd');
+      var end = new Date(list[i].endTime * 1000).pattern('yyyy-MM-dd');
+      showTime += new Date(list[i].startTime * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(list[i].endTime * 1000).pattern('yyyy年MM月dd日');
+
+      var typeName = "";
+      if (list[i].type === 1) {
+        typeName = "续费"
+      } else if (list[i].type === 0) {
+        typeName = "升级"
+      }
+      var showArea = "";
+      if (list[i].oldBuyset.areacount === -1) {
+        showArea = "全国"
+      } else {
+        //if (list[i].oldBuyset.newcitys.length > 0) {
+        var cityCount = 0;
+        for (var j = 0; j < list[i].oldBuyset.newcitys.length; j++) {
+          cityCount += list[i].oldBuyset.newcitys[j];
+        }
+        if (list[i].oldBuyset.areacount != 0) {
+          showArea = list[i].oldBuyset.areacount + "个省";
+          if (list[i].oldBuyset.newcitys.length > 1) {
+            showArea += "、" + cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
+          } else {
+            if (cityCount != 0) {
+              showArea += "、" + cityCount + "个市";
+            }
+          }
+        } else {
+          if (list[i].oldBuyset.newcitys.length > 1) {
+            showArea += cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
+          } else {
+            if (cityCount != 0) {
+              showArea += cityCount + "个市";
+            }
+          }
+        }
+        //}
+      }
+      var industryShow = "";
+      if (list[i].oldBuyset.buyerclasscount === -1) {
+        industryShow = "全行业"
+      } else {
+        industryShow = list[i].oldBuyset.buyerclasscount + "个行业";
+      }
+      returnHtml += "<li class='list-item'>"
+        + '<div class="item-top">'
+        + '<div class="item-header">'
+        + '<span class="header-label">有效日期:</span>'
+        + '<span class="header-content ellipsis">' + showTime + '</span>'
+        + '</div>'
+        + '<div class="item-body">'
+        + '<div class="b-item body-area">'
+        + '<div class="body-area-title text-title">区域</div>'
+        + '<div class="body-area-sub">' + showArea + '</div>'
+        + '</div>'
+        + '<div class="b-item body-industry">'
+        + '<div class="body-industry-title text-title">采购单位行业</div>'
+        + '<div class="body-industry-sub">' + industryShow + '</div>'
+        + '</div>'
+      if (typeName != "") {
+        returnHtml += '<div class="vp-type">'
+          + '<div class="vp-type-text">' + typeName + '</div>'
+          + '</div>'
+      }
+
+      returnHtml += '</div>'
+        + '</div>'
+        + '<div class="item-footer">'
+        + '<span class="footer-label">小计:</span>'
+        + '<span class="footer-content text-title">¥' + (list[i].price / 100) + '</span>'
+        + '</div>'
+        + '</li>'
+
+      total_price += (list[i].price);
+    }
+    $(".total-price").text("共计:¥" + money / 100);
+    $(".list-content").html(returnHtml);
+  }
+
+  function MonthsBetw(date1, date2) { //date1和date2是2019-3-12格式
+    //用-分成数组
+    date1 = date1.split("-");
+    date2 = date2.split("-");
+    //获取年,月数
+    var year1 = parseInt(date1[0]),
+      month1 = parseInt(date1[1]),
+      year2 = parseInt(date2[0]),
+      month2 = parseInt(date2[1]),
+      //通过年,月差计算月份差
+      months = (year2 - year1) * 12 + (month2 - month1);
+    return months;
+  }
+
+})
+var orderCode_ = decodeURIComponent(getParam("orderCode"));
+//选择
+function choosePayWay() {
+  window.location.href = "/jyapp/course/optionPay?code=" + orderCode_
+}
+//订单详情
+$(".icon-fanhui").on("click", function () {
+  history.go(-1)
+})
+
+//查看发票
+function checkinvoice() {
+  window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode_
+}
+//开发票
+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_;
+    } else {
+      window.location.href = "/jyapp/front/cantInvoice";
+    };
+  })
+}
+
+//苹果端  刷新js
+$(function () {
+  var isPageHide = false;
+  window.addEventListener('pageshow', function () {
+    if (isPageHide) {
+      location.reload();
+    }
+  });
+  window.addEventListener('pagehide', function () {
+    isPageHide = true;
+  });
+});

+ 18 - 986
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_order_detail.html

@@ -14,238 +14,33 @@
     <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
     <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/public_.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.css">
-    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/vip_order_detail.css?v={{Msg "seo" "version"}}3">
-    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/appbutton.css?v={{Msg "seo" "version"}}"/>
+    
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
 
-	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
-	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
-	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/appbutton.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/vip_order_detail.css?v={{Msg "seo" "version"}}">
 </head>
-<style>
-  html, body {
-    height: 100%;
-  }
-
-.stop{
-    overflow: hidden;
-    height: 100%;
-}
-.va-total-container .total-price {
-    font-weight: 400 !important;
-    font-size: 0.36rem  !important;
-    color: #FB483D !important;
-}
-.person > p >span , .unit > p >span{
-	margin-bottom: .12rem;
-}
-.jymobile-setting-dialog {
-  font-size: .32rem;
-}
-
-.jymobile-setting-dialog .weui-dialog__hd {
-  padding: 0;
-  height: 0.82rem;
-  line-height: .82rem;
-  text-align: center;
-  background-color: #F5F4F9;
-}
-
-.jymobile-setting-dialog .weui-dialog__hd .weui-dialog__title {
-  font-size: .36rem;
-}
-
-.jymobile-setting-dialog .weui-dialog__bd {
-  padding: .37rem .1rem .38rem;
-  color: #1D1D1D;
-  font-size: .32rem;
-  text-align: center;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft {
-  display: flex;
-  padding: 0 0 .38rem 0;
-  text-align: center;
-  justify-content: space-around;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft:after {
-  border: none;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn {
-  display: flex;
-  flex: none;
-  align-items: center;
-  justify-content: center;
-  width: 1.72rem;
-  height: .72rem;
-  color: #fff;
-  font-size: .32rem;
-  vertical-align: center;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn_primary {
-  margin: 0;
-  margin-left: .3rem;
-  background-color: #2CB7CA;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn_default {
-  margin: 0;
-  margin-right: .3rem;
-  background-color: #BFBFC3;
-}
-.cancel_time{
-	font-size: 16px;
-	margin-left: 20px;
-}
-
-.pay_way .box {
-    position: fixed;
-    bottom: 0;
-    left: 0;
-    width: 100%;
-    background: #fff;
-    height: 4.9rem;
-    z-index: 9999;
-}
-.pay_way .box .box_hd {
-    padding: 0 .4rem;
-    height: .88rem;
-    line-height: .88rem;
-    background: #F4F4F9;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-pack: justify;
-    -ms-flex-pack: justify;
-    justify-content: space-between;
-    -webkit-box-align: center;
-    -ms-flex-align: center;
-    align-items: center;
-    border-bottom: 1px solid #eee;
-}
-
- .pay_way .box .box_bd p {
-    font-size: .32rem;
-}
-.pay_way .box .box_bd .zfb_label{
-	margin-bottom:.38rem;
-}
- .pay_way .box .box_hd>h3 {
-    color: #1D1D1D;
-    font-size: .32rem;
-}
-.pay_way .box .box_hd .cancel {
-    color: #2cb7ca;
-    font-size: .32rem;
-}
-.pay_way .box .box_bd img {
-    width: .8rem;
-    height: .8rem;
-    margin-right: .3rem;
-}
-.pay_way .box .box_bd .wx_label, .pay_way .box .box_bd .zfb_label {
-    margin-top: .38rem;
-    padding: 0 .3rem;
-}
-.zfje{
-	font-size: .32rem;
-	margin: 0 auto;
-
-}
-.money_pay{
-    font-size: .50rem;
-    text-align: center;
-    height: 1rem;
-    line-height: 1rem;
-}
-.surePay{
-	font-size: .40rem;
-    text-align: center;
-    height: 1rem;
-    line-height: 1rem;
-    background-color: #2CB7CA;
-    color: #fff;
-    margin-top:  0.28rem;
-}
-
-.weui-cells {
-    margin-top: 0px !important;
-    background-color:
-	#fff;
-	line-height: 1.47058824;
-	font-size: 17px;
-	overflow: hidden;
-	position: relative;
-}
-
-.weui-cell::before {
-    content: " ";
-    position: absolute;
-    left: 0;
-    top: 0;
-    right: 0;
-    height: 1px;
-    border-top: 0px solid #e5e5e5 !important;
-    border-top-color:
-    rgb(229, 229, 229);
-    border-top-style: solid;
-    border-top-width: 5px;
-	color:#e5e5e5;
-    -webkit-transform-origin: 0 0;
-    transform-origin: 0 0;
-    -webkit-transform: scaleY(.5);
-    transform: scaleY(.5);
-    left: 15px;
-    z-index: 2;
-}
-
-.pay_way .box .box_bd .weui-check:checked + .weui-icon-checked:before {
-    color: #2cb7ca;
-}
-
-.nothing{
-  height: 100%;
-	margin: 50% auto;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-  flex-direction:column;
-}
-.nothing img{
-    width: 120px;
-}
-.nothingDiv {
-	padding-top:0.42rem;
-	font-size:0.3rem;
-	color:#838384;
-}
-.j-footer {
-  display: none;
-}
-</style>
 <body style="visibility:hidden">
-	<div class="j-container" id="order_detail">
-	<!--			过期的订单-->
-	<div class="nothing" style="display:none">
-        <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/image/nothing.png?v=51430"/>
-		<div class="nothingDiv">
-			该订单记录已删除
-		</div>
-    </div>
+    <div class="j-container" id="order_detail">
 		<div class="j-header jy-app-header">
-			<span class="header-left iconfont icon-fanhui"><em class="left-title">订单详情</em></span>
-			<span class="header-title"></span>
+			<span class="header-left iconfont icon-fanhui"></span>
+			<span class="header-title">订单详情</span>
 			<span class="header-right"></span>
-		</div>
+    </div>
+    <!-- 过期的订单 -->
+    <div class="nothing" style="display:none">
+      <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/image/nothing.png?v=51430"/>
+      <div class="nothingDiv">该订单记录已删除</div>
+    </div>
 		<div class="j-body">
 			<div  id="card-header-bg">
 				<h3 id="pageTitle" ></h3>
 				<!-- <h3>待付款</h3> -->
 				<p class="remaining" hidden></p>
 			</div>
-	                    <div class="order-main">
+	        <div class="order-main">
 							<div class="vip_order">
 								<div class="top">
 									<div class="order-img">
@@ -362,772 +157,9 @@
 <!--<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/fastclick.min.js"></script>-->
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.js"></script>
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "mod_version"}}"></script>
-
 <script>
-  $(function(){
-    var canpay=true;
-    var orderCode=decodeURIComponent(getParam("orderCode"));
-	var pay_way="wx_app";
-    if(!orderCode){
-      weui.toast("订单号异常",{
-        duration: 2000,
-        className: 'custom-toast',
-	    });
-    }
-    $(".orderCode").text(orderCode);
-	$(".order_code_vip").text(orderCode);
-    $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg",{"orderCode":orderCode},function(r){
-		$("body").css("visibility","");
-      if(r.success){
-		if(r.data.order.order_status==-1){
-			$(".nothing").show();
-			$(".j-body").remove();
-		}
-        //下单时间
-        if(r.data.order.create_time) {
-        	$(".prepayTime").text(r.data.order.create_time.replace("-",".").replace("-","."));
-        }
-        //产品类型
-        if(r.data.order.product_type) $(".productType").text(r.data.order.product_type);
-        if(r.data.order.original_price==0){
-        	$(".productType").text(r.data.order.product_type+"(试用)");
-        }
-        //价格
-        $(".price").text("¥ "+r.data.order.original_price/100+"元");
-		//优惠码
-		if(r.data.order.isUsedActiveCode){
-			$(".discount-container").removeClass("hide");
-		}
-		if(!r.data.order.isLiveActive){
-			$(".origin-price-container").hide();
-		}else{
-            var activeDiscount = {{Msg "seo" "activeDiscount"}};
-			var originPrice = (r.data.order.original_price/100 / parseFloat(activeDiscount)).toFixed(2);
-			$(".price-num").text(originPrice);
-			$(".bill-origin-price").css("display","flex");
-		}
-		
-		var areaText="";
-		var industry_vip="";
-        //订单条件
-        if(r.data.order.filter){
-            var filterObj=JSON.parse(r.data.order.filter);
-			var newbuyset =filterObj.newBuyset;
-        	if ((r.data.order.vip_type!=2)&&(r.data.order.vip_type!=1)){
-	           if(!$.isEmptyObject(newbuyset)){
-				   var val = getnewbuyset(newbuyset);
-				   areaText=val[0];
-				   industry_vip=val[1];
-				   $(".areaNum").text(areaText);
-				   $(".industryNum").text(industry_vip);
-			   }else{
-				   //省份数 城市数
-				   if(!$.isEmptyObject(filterObj.area)){
-				     	var cityNum=0;
-				     	var provinceNum=0;
-				     	for(var i in filterObj.area) {
-				           let citys=filterObj.area[i];
-				           if(citys.length>0){
-				             cityNum+=citys.length;
-				           }else{
-				             	provinceNum++;
-				           }
-				     	}
-				     	var areaText="";//1个省级区域、4个地市
-				     	if(provinceNum>0) areaText= areaText + provinceNum+"个省级区域";
-				     	if(cityNum>0){
-				       	if(provinceNum>0) areaText= areaText+"、"
-				       	areaText = areaText+ cityNum+"个地市";
-				   	}
-				     	$(".areaNum").text(areaText);
-				   }else{
-				   	$(".areaNum").text("全国");
-				   }
-				   //行业数
-				   if(filterObj.industry.length!=0){
-				       $(".industryNum").text(filterObj.industry.length+"个行业");
-				   }else{
-				       $(".industryNum").text("全行业");
-				   }
-			   }
-	        }else if(r.data.order.vip_type==2){
-				if(!$.isEmptyObject(newbuyset)){
-					var val = getnewbuyset(newbuyset);
-					areaText=val[0];
-					industry_vip=val[1];
-					$(".areaNum").text(areaText);
-					$(".industryNum").text(industry_vip);
-				}else{
-					//升级订单 单独处理
-					if(!$.isEmptyObject(filterObj.addareacount)){
-						if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city==0)){
-							areaText="全国";
-						}
-						if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city==0)){
-							areaText=filterObj.addareacount.province+"个省级区域";
-						}
-						if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city!=0)){
-							areaText=filterObj.addareacount.city+"个地市";
-						}
-						if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city!=0)){
-							areaText=filterObj.addareacount.province+"个省级区域、"+filterObj.addareacount.city+"个地市";
-						}
-					}else{
-						areaText="无";
-					}
-					$(".areaNum").text(areaText);
-					//行业
-					var industry_vip="";
-					industry_vip=filterObj.addbuyerclasscount+"个行业";
-					if(filterObj.addbuyerclasscount==0){
-						industry_vip="无";
-					}
-					if(filterObj.addbuyerclasscount==-1){
-						industry_vip="全行业";
-					}
-					$(".industryNum").text(industry_vip);
-				}
-
-	        }else if(r.data.order.vip_type==1){
-				if(!$.isEmptyObject(newbuyset)){
-					var val = getnewbuyset(newbuyset);
-					areaText=val[0];
-					industry_vip=val[1];
-					$(".areaNum").text(areaText);
-					$(".industryNum").text(industry_vip);
-				}else{
-					var renewal_market=0; //续费市级地区
-					var buyset=filterObj.buyset;
-					if (buyset.areacount==-1){
-						$(".areaNum").text("全国");
-					}else{
-						if(!$.isEmptyObject(buyset.citys)){
-							for (var key in buyset.citys) {
-							    renewal_market+=(buyset.citys[key]);
-							}
-						}
-						//
-						var areaText="";
-						if ((buyset.areacount!=0)&&(renewal_market!=0)){
-							areaText=buyset.areacount+"个省级地区、"+renewal_market+"个地市";
-						}else if((buyset.areacount==0)&&(renewal_market!=0)){
-							areaText=renewal_market+"个地市";
-						}else if((buyset.areacount!=0)&&(renewal_market==0)){
-							areaText=buyset.areacount+"个省级地区";
-						}
-						$(".areaNum").text(areaText);
-					}
-					if(buyset.buyerclasscount==-1){
-						$(".industryNum").text("全行业");
-					}else{
-						$(".industryNum").text(buyset.buyerclasscount+"个行业");
-					}
-				}
-			}
-
-        }
-
-               //周期
-            if((r.data.order.vip_starttime!=undefined)&&(r.data.order.vip_endtime!=undefined)){
-				var start_time_vip = r.data.order.vip_starttime;
-				var end_time_vip = r.data.order.vip_endtime;
-				var start_time_arr = start_time_vip.split(" ")[0].split("-")
-				var end_time_arr = end_time_vip.split(" ")[0].split("-")
-				var start_year=start_time_arr[0];
-				var start_month=start_time_arr[1];
-				var end_year=end_time_arr[0];
-				var end_month=end_time_arr[1];
-				var year = 0;
-       			var month = 0;
-       			if(end_year > start_year){
-       	    		if(end_month > start_month){
-           				year = end_year - start_year;
-           				month = end_month - start_month;
-       	    		}else{
-           				year = end_year - start_year-1;
-           				month = 12+Number(end_month)-start_month;
-           				if (month==12){
-           					year=Number(year)+1;
-           					month=0;
-           				}
-       	    		}
-       	    	}else if(end_year === start_year){
-           			month = end_month - start_month;
-       	    	}
-
-       	    	if(year != 0 && month !=0){
-       	    		$(".cyclecount").text(year+"年"+month+"个月");
-       	    	}else if(year !== 0&& month ===0){
-       	    		$(".cyclecount").text(year+"年");
-       	    	}else if(year === 0&& month !==0){
-       	    		$(".cyclecount").text(month+"个月");
-       	    	}
-       			if(filterObj.cycleunit==1){
-			        $(".cyclecount").text(filterObj.cyclecount+"年")
-			    }else if(filterObj.cycleunit==2){
-			       $(".cyclecount").text(filterObj.cyclecount+"个月")
-			    }else if(filterObj.cycleunit==3){
-			       $(".cyclecount").text(filterObj.cyclecount+"天")
-			    }
-            }else{
-				//未支付
-				if(filterObj.cycleunit==1){
-					$(".cyclecount").text(filterObj.cyclecount+"年")
-				}else if(filterObj.cycleunit==2){
-					$(".cyclecount").text(filterObj.cyclecount+"个月")
-				}else if(filterObj.cycleunit==3){
-					$(".cyclecount").text(filterObj.cyclecount+"天")
-				}
-			}
-
-
-			if(r.data.order.vip_type==1){
-				$(".productType").text(r.data.order.product_type+"(续费)");
-				$(".dyqy").text("续费区域:");
-				$(".dyhy").text("续费采购单位行业:");
-				$(".dyzq").text("续费周期:");
-			}else if(r.data.order.vip_type==2){
-				$(".productType").text(r.data.order.product_type+"(升级)");
-				if(filterObj.cycleunit==1){
-					$(".cyclecount").text(filterObj.cyclecount+"年")
-				}else if(filterObj.cycleunit==2){
-					$(".cyclecount").text(filterObj.cyclecount+"个月")
-				}else if(filterObj.cycleunit==3){
-					$(".cyclecount").text(filterObj.cyclecount+"天")
-				}else if (filterObj.cycleunit==-1){
-					$(".cyclecount").text("不延期");
-				}
-				$(".dyqy").text("升级区域:");
-				$(".dyhy").text("升级采购单位行业:");
-				$(".dyzq").text("延长周期:");
-			}else{
-				if(filterObj.cycleunit==1){
-					$(".cyclecount").text(filterObj.cyclecount+"年")
-				}else if(filterObj.cycleunit==2){
-					$(".cyclecount").text(filterObj.cyclecount+"个月")
-				}else if(filterObj.cycleunit==3){
-					$(".cyclecount").text(filterObj.cyclecount+"天")
-				}
-			}
-
-			//升级续费
-			var fnewBuyset =filterObj.newBuyset;
-			if(!$.isEmptyObject(fnewBuyset)){
-				//续费升级逻辑修改后判断是否不延期
-				if(filterObj.cycleunit==0&&filterObj.cyclecount==0){
-					$(".cyclecount").text("不延期");
-				}
-			}
-        if(r.data.order.order_status==0){
-          //未支付
-			$("#card-header-bg").addClass("bg nopay-bg")
-			$("#pageTitle").addClass("status")
-	        $("#pageTitle").text("待付款");
-			$(".remaining").show()
-			var order_create_time = r.data.order.create_time
-			order_create_time = order_create_time.replace(/-/g, '/')
-			var downtime  = r.data.order.order_countdown.split("h")[0]
-			downtime = downtime*60*60*1000
-			var t =setInterval(() => {
-				var nowtime = new Date()  //获取当前时间
-				endtime = new Date(order_create_time);  //定义结束时间
-				var lefttime = endtime.getTime()+downtime - nowtime.getTime() //距离结束时间的毫秒数
-				if(Math.floor(lefttime %1000)<=0){
-					clearInterval(t)
-					$.ajax({
-						type: "post",
-						url: "/subscribepay/orderListDetails/deleteOrder",
-						data: {
-							"id": r.data.order.id,
-							"pageNum": 1,
-							"type": 1,
-							"cancel": "cancel"
-						},
-						dataType: 'json',
-						success: function () {
-							$(".nopay-bg h3").text("已取消")
-							$(".remaining").text("")
-							$(".nopay-bg").removeClass("nopay-bg").addClass("cancel-bg")
-							$(".j-footer").hide()
-						}
-					})
-				}else{
-					var hour = Math.floor(lefttime / (1000 * 60 * 60)),  //计算小时数
-							hour = hour < 10 ? '0' + hour : hour;
-					var minute = Math.floor(lefttime / (1000 * 60) % 60),  //计算分钟数
-							minute = minute < 10 ? '0' + minute : minute;
-					var seconds = Math.floor(lefttime / 1000 % 60);  //计算秒数
-					seconds = seconds < 10 ? '0' + seconds : seconds;
-					$(".remaining").text("剩余支付时间:"+hour+":"+minute+":"+seconds)
-				}
-			},1000)
-	        $(".invoice").hide();//隐藏开发票
-			 //支付方式
-			  if(r.data.order.pay_way.indexOf("wx")>-1){
-				//$(".line_payway").css("display","");
-				  $("#wx").prop("checked",true);
-				  $("#zfb").prop("checked",false);
-				$(".payWay").text("微信支付");
-				pay_way="wx_app"
-			  }else if(r.data.order.pay_way.indexOf("ali")>-1){
-				$(".payWay").text("支付宝支付");
-				  $("#wx").prop("checked",false);
-				  $("#zfb").prop("checked",true);
-				pay_way="ali_app"
-        }
-
-			  var pay_now = "<button class=\"j-button-confirm\" style='width: 100%!important;' onclick=choosePayWay()>去支付</button>"
-			  $(".j-footer").show().html(pay_now)
-        $(".button.align").css("display","").on("click",function(){//显示去支付按钮
-	         	$("#pay_way").show();
-				if(localStorage.getItem(orderCode)=="wx"){
-				  pay_way="wx_app"
-				  $("#wx").prop("checked",true);
-				  $("#zfb").prop("checked",false);
-				}else if (localStorage.getItem(orderCode)=="ali"){
-				  $("#wx").prop("checked",false);
-				  $("#zfb").prop("checked",true);
-				  pay_way="ali_app"
-				}
-	        })
-        }else if (r.data.order.order_status==1){
-		  $("#card-header-bg").addClass("bg finish-bg")
-		  $("#pageTitle").addClass("status")
-          $("#pageTitle").text("已完成");
-          //支付时间
-          $(".line_paytime").css("display","");
-          if(r.data.order.pay_time) $(".payTime").text(r.data.order.pay_time.replace("-",".").replace("-","."));
-          if (r.data.order.original_price==0){
-         	 $(".line_paytime").css("display","none");
-          }
-
-          //有效周期
-          $(".line_cycle").css("display","");
-          //有效日期
-          if(r.data.time.vip_starttime&&r.data.time.vip_endtime){
-            	var vip_starttime=r.data.time.vip_starttime+"";
-           		var vip_endtime=r.data.time.vip_endtime+"";
-           		vip_starttime=vip_starttime.split(" ")[0].replace(/-/g,".");
-           		vip_endtime=vip_endtime.split(" ")[0].replace(/-/g,".");
-           		var serviceTime=vip_starttime+" - "+vip_endtime;
-           	  	$(".serviceTime").text(serviceTime)
-          }
-
-          //支付方式
-		  if(r.data.order.pay_way.indexOf("wx")>-1){
-			$(".line_payway").css("display","");
-			$(".payWay").text("微信支付");
-			pay_way="wx_app"
-		  }else if(r.data.order.pay_way.indexOf("ali")>-1){
-			$(".payWay").text("支付宝支付");
-			$(".line_payway").css("display","");
-			pay_way="ali_app"
-		  }else{//试用用户
-			$(".invoice").css("display","none");
-			return
-		  }
-
-
-
-          $(".line_transaction").css("display","");
-          if(r.data.transaction_id) $(".transaction_id").text(r.data.transaction_id);
-          var pay_again = ""
-          //发票
-          if(r.data.order.applybill_status==0){
-            //已支付未申请发票
-			      pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()' style='width: 100%!important;'>开发票</button>"
-            $(".invoice .invoicing").css("display","");
-            $(".invoicing").on("click",function(){
-            	var nowTimestamp= (new Date()).valueOf();
-            	$.post("/subscribepay/orderListDetails/emailOperation?v="+nowTimestamp,{},function(r){
-					if (r.success){
-						//没有绑定邮箱
-						weuiDialog();
-					}else{
-						//绑定了邮箱
-						window.location.href="/jyapp/front/myOrder/getOrderCode/"+orderCode;
-					}
-				})
-            });
-          }else{
-            //已支付已申请发票
-			  pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice()' style='width: 100%!important;'>查看发票</button >"
-			    $(".invoice").css("display","none");
-				switch (r.data.order.applybill_type){
-					case 0:
-					$(".person").css("display","");
-					break;
-					case 1:
-					$(".unit").css("display","");
-					$(".company_name").html(r.data.order.applybill_company);
-					$(".taxpayer_number").html(r.data.order.applybill_taxnum);
-					break;
-				}
-
-          }
-          $(".j-footer").show().html(pay_again)
-        }else if(r.data.order.order_status==-2){
-			$("#card-header-bg").addClass("bg cancel-bg")
-			$("#pageTitle").addClass("status")
-    		$("#pageTitle").text("已取消");
-     		$(".invoice").css("display","none");//隐藏开发票
-        }
-      }
-
-	//计价清单
-	var filterObj=JSON.parse(r.data.order.filter);
-	var upgradeSubtotail=filterObj.upgradeSubtotail;
-	if (upgradeSubtotail){	//有则显示
-		$.ajax({
-			type: 'POST',
-			url: '/subscribepay/orderListDetails/getValuationList',
-			data: {
-				"order_code":orderCode
-			},
-			success: function (data) {
-                appendList(data.list,data.order_money);
-			}
-		});
-		$(".valuationList").show();
-		// 计算标准点击事件
-		$('.valuationList').on('click', function () {
-			pickerShow('.billing-list-container', true)
-      $("html,body").addClass("stop");
-		})
-		// 计算标准隐藏
-		$('.billing-list-container .dialog_hd__close').on('click', function () {
-			pickerShow('.billing-list-container', false)
-      $("html,body").removeClass("stop");
-		})
-		$('.weui-mask').on('click', function () {
-			pickerShow('.billing-list-container', false)
-      $("html,body").removeClass("stop");
-		})
-	}
-
-		//离开按钮
-		$(".cancel").click(function() {
-			$('.pay_way').hide(200)
-		});
-
-		/* 选择支付方式*/
-		$('input:radio[name="way"]').click(function() {
-			var checkValue = $('input:radio[name="way"]:checked').val();
-			if(checkValue=="微信支付"){
-				localStorage.setItem($(".order_code_vip").text(),"wx");
-				$("#wx").prop("checked",true);
-				$("#zfb").prop("checked",false);
-		    	pay_way="wx_app";
-			}else{
-				localStorage.setItem($(".order_code_vip").text(),"ali");
-				$("#wx").prop("checked",false);
-				$("#zfb").prop("checked",true);
-				pay_way="ali_app";
-			}
-		});
-
-		//确认支付
-		$("#pay").on("click", function() {
-			$(".loading_").show();
-			//vip支付;
-				if(!canpay)return
-				canpay=false;
-			    $.post("/subscribepay/vipsubscribe/orderToPay",{"orderCode":orderCode,"pay_way":pay_way},function(r){
-			    	if(r.success){
-			    		  if(pay_way=="wx_app"){
-			                  JyObj.wxPay(r.data.res);
-			                }else{
-			                  JyObj.aliPay(r.data.res);
-			                }
-			                $('.pay_way').hide(200)
-							canpay=true;
-			                checkPaySuccess_vip(orderCode);
-			    	}
-				})
-		})
-
-    })
-
-    function formatEffectiveDate(strat,end){
-        var startDate = new Date(strat*1000);
-        var endDate = new Date(end*1000);
-        return formatDate(startDate)+" - "+formatDate(endDate)
-    }
-    function formatDate(d){
-	    return (d.getFullYear()) + "." +
-	    (Array(2).join(0)+(d.getMonth() + 1)).slice(-2) + "." +
-	    (Array(2).join(0)+(d.getDate())).slice(-2);
-    }
-
-	function weuiDialog(){
-		weui.dialog({
-			title: '提示信息',
-			content: '您未绑定邮箱<br/>请绑定后再开发票',
-	        className: 'jymobile-setting-dialog',// 设置弹框的类名
-	        buttons: [
-	        {
-	        	label: '去设置',
-	        	type: 'primary',
-	        	onClick: function () {
-	        			window.location.replace("/jyapp/front/myorder/myEmail?name=invoice&orderCode="+orderCode);
-	        	}
-	        },
-	        {
-	        	label: '取消',
-	        	type: 'default',
-	        	onClick: function () {
-	        		console.log('取消')
-	        	}
-	        }
-	        ]
-	    });
-	}
-	var interval_vip
-	//支付完成跳转 VIP订单
-	function checkPaySuccess_vip(order_vipcode){
-		if(interval_vip){
-			clearInterval(interval_vip)
-		}
-		$(".loading_").show();
-		interval_vip=setInterval(function(){
-			$.post("/jypay/isPaySuccess",{code:order_vipcode},function(r){
-				if(r.success){
-					clearInterval(interval_vip);
-					$(".loading_").hide();
-					window.location.href="/jyapp/vipsubscribe/toPaySuccessPage?orderCode="+order_vipcode;
-				}
-			})
-		},3000)
-		$(".loading_").hide();
-	}
-
-	function PrefixInteger(num,n) {
-		return (Array(n).join(0) + num).slice(-n);
-	}
-	// 参数为结束时间戳
-	function setTimeFunc (endtime){
-  		var t = endtime - +new Date();
-  		if (t <= 0) {
-  			$(".button").hide();
-  			$(".cancel_time").hide();
-  			$("#pageTitle").html("已取消");
-  		}
-  		var days_ =PrefixInteger(parseInt(t/1000/60/60, 10).toString(),2)
-  		var minutes_ =PrefixInteger(parseInt(t/1000/60%60, 10).toString(),2)
-  		var seconds =PrefixInteger(parseInt(t/1000%60, 10).toString(),2)
-  		$(".cancel_time").text("剩余"+days_+":" + minutes_+":"+seconds+" ");
-	  }
-
-	  //升级续费逻辑重写后的数据处理
-	  function getnewbuyset(newBuyset){
-		if(newBuyset.areacount!=-1){
-			var newcitys=newBuyset.newcitys;
-			var scatter=newcitys.length ;//分布
-			var citynum=0;
-			for(var k in newcitys){
-				citynum+=newcitys[k];
-			}
-			if(newBuyset.areacount>0){
-				areaText=newBuyset.areacount+"个省级区域";
-				if (citynum!=0){
-					if(scatter>1){
-						areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-					}else{
-						areaText+="、"+citynum+"个地市";
-					}
-				}
-			}else{
-				if (scatter>1){
-					areaText=citynum+"个地市(分布在"+scatter+"省内)";
-				}else{
-					areaText=citynum+"个地市";
-				}
-			}
-		}else{
-			areaText="全国";
-		}
-		var buyerclasscount=newBuyset.buyerclasscount;
-		if(buyerclasscount>3){
-			buyerclasscount=filterObj.industry.length;
-			industry_vip="全行业("+buyerclasscount+"个行业)";
-		}else{
-			industry_vip=buyerclasscount+"个行业";
-		}
-		if(buyerclasscount==-1){
-			industry_vip="全行业";
-		}
-		return [areaText,industry_vip]
-	  }
-	 	 // picker的显示隐藏
-	 	function pickerShow(selector, f) {
-	 		if (f) {
-	 			// 添加进场动画,并显示
-	 			$(selector).find('.weui-mask').removeClass('weui-animate-fade-out').addClass('weui-animate-fade-in')
-	 			$(selector).find('.weui-picker').removeClass('weui-animate-slide-down').addClass('weui-animate-slide-up')
-	 			$(selector).show(300);
-	 		} else {
-	 			// 添加离场动画,并隐藏
-	 			$(selector).find('.weui-mask').removeClass('weui-animate-fade-in').addClass('weui-animate-fade-out')
-	 			$(selector).find('.weui-picker').removeClass('weui-animate-slide-up').addClass('weui-animate-slide-down')
-	 			$(selector).hide(300);
-	 		}
-	 	}
-	 	var total_price=0;
-	 	function appendList(list,money){
-	 		var returnHtml = "";
-	 		for (var i = 0; i < list.length; i++) {
-	 			var showTime=""
-	 			var start= new Date(list[i].startTime * 1000).pattern('yyyy-MM-dd');
-	 			var end =new Date(list[i].endTime * 1000).pattern('yyyy-MM-dd');
-	 		/*	var effective = MonthsBetw(start,end);	//月份
-	 			if (effective>=12){	//年份转换
-	 				if (effective%12==0){
-	 					showTime +="("+(effective/12)+"年)";
-	 				}else{
-	 					var effective_year ="";
-	 					effective_year+=(effective/12);
-	 					var indexof= effective_year.lastIndexOf(".");
-	 					effective_year =effective_year.substring(0,indexof);
-	 					showTime+="("+effective_year+"年"+(effective%12)+"个月)";
-	 				}
-	 			}else{
-	 				showTime +="("+effective+"个月)";
-	 			}
-				*/
-	 			showTime += new Date(list[i].startTime * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(list[i].endTime * 1000).pattern('yyyy年MM月dd日');
-
-
-	 			var typeName = "";
-	 			if (list[i].type === 1) {
-	 				typeName = "续费"
-	 			} else if (list[i].type === 0) {
-	 				typeName = "升级"
-	 			}
-	 			var showArea = "";
-	 			if (list[i].oldBuyset.areacount === -1) {
-	 				showArea = "全国"
-	 			} else {
-	 				//if (list[i].oldBuyset.newcitys.length > 0) {
-	 					var cityCount = 0;
-	 					for (var j = 0; j < list[i].oldBuyset.newcitys.length; j++) {
-	 						cityCount += list[i].oldBuyset.newcitys[j];
-	 					}
-	 					if(list[i].oldBuyset.areacount!=0){
-	 						showArea = list[i].oldBuyset.areacount + "个省";
-	 						if (list[i].oldBuyset.newcitys.length>1){
-	 							showArea += "、" + cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
-	 						}else{
-	 							if(cityCount!=0){
-	 								showArea += "、" + cityCount + "个市";
-	 							}
-	 						}
-	 					}else{
-	 						if (list[i].oldBuyset.newcitys.length>1){
-	 							showArea += cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
-	 						}else{
-	 							if(cityCount!=0){
-	 								showArea += cityCount + "个市";
-	 							}
-	 						}
-	 					}
-	 				//}
-	 			}
-	 			var industryShow = "";
-	 			if (list[i].oldBuyset.buyerclasscount === -1) {
-	 				industryShow = "全行业"
-	 			} else {
-	 				industryShow = list[i].oldBuyset.buyerclasscount + "个行业";
-	 			}
-	 			returnHtml += "<li class='list-item'>"
-	 				+ '<div class="item-top">'
-	 				+ '<div class="item-header">'
-	 				+ '<span class="header-label">有效日期:</span>'
-	 				+ '<span class="header-content ellipsis">' + showTime + '</span>'
-	 				+ '</div>'
-	 				+ '<div class="item-body">'
-	 				+ '<div class="b-item body-area">'
-	 				+ '<div class="body-area-title text-title">区域</div>'
-	 				+ '<div class="body-area-sub">' + showArea + '</div>'
-	 				+ '</div>'
-	 				+ '<div class="b-item body-industry">'
-	 				+ '<div class="body-industry-title text-title">采购单位行业</div>'
-	 				+ '<div class="body-industry-sub">' + industryShow + '</div>'
-	 				+ '</div>'
-	 			if (typeName != "") {
-	 				returnHtml += '<div class="vp-type">'
-	 					+ '<div class="vp-type-text">' + typeName + '</div>'
-	 					+ '</div>'
-	 			}
-
-	 			returnHtml += '</div>'
-	 				+ '</div>'
-	 				+ '<div class="item-footer">'
-	 				+ '<span class="footer-label">小计:</span>'
-	 				+ '<span class="footer-content text-title">¥' +(list[i].price/100) + '</span>'
-	 				+ '</div>'
-	 				+ '</li>'
-
-	 			total_price+=(list[i].price) ;
-	 		}
-	 		$(".total-price").text("共计:¥"+money/100);
-	 		$(".list-content").html(returnHtml);
-	 	}
-
-	 	function MonthsBetw(date1, date2) { //date1和date2是2019-3-12格式
-	 	    //用-分成数组
-	 	    date1 = date1.split("-");
-	 	    date2 = date2.split("-");
-	 	    //获取年,月数
-	 	    var year1 = parseInt(date1[0]),
-	 	        month1 = parseInt(date1[1]),
-	 	        year2 = parseInt(date2[0]),
-	 	        month2 = parseInt(date2[1]),
-	 	        //通过年,月差计算月份差
-	 	        months = (year2 - year1) * 12 + (month2 - month1);
-	 	    return months;
-	 	}
-
-  })
-  var orderCode_=decodeURIComponent(getParam("orderCode"));
-  //选择
-  function choosePayWay(){
-
-	  window.location.href = "/jyapp/course/optionPay?code="+orderCode_
-  }
-  //订单详情
-  $(".icon-fanhui").on("click",function () {
-	  history.go(-1)
-  })
-
-  //查看发票
-  function checkinvoice() {
-
-	  window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code="+orderCode_
-  }
-  //开发票
-  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_;
-          }else{
-    				window.location.href = "/jyapp/front/cantInvoice";
-          };
-      })
-  }
-
-  //苹果端  刷新js
-  $(function () {
-		var isPageHide = false;
-		window.addEventListener('pageshow', function () {
-		    if (isPageHide) {
-                location.reload();
-		    }
-		});
-		window.addEventListener('pagehide', function () {
-		    isPageHide = true;
-		});
-	});
+  var activeDiscount = {{Msg "seo" "activeDiscount"}};
 </script>
+<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/vip_order_detail.js?v={{Msg "seo" "version"}}"></script>
 	{{include "/common/baiducc.html"}}
 </html>