Просмотр исходного кода

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

wangshan 3 лет назад
Родитель
Сommit
af432f4c06

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

@@ -30,11 +30,11 @@ $(function () {
                     $(".productType").text("超级订阅(试用)");
                 }
             }
-            if (r.data.order.discount_price==undefined) {
+            if (!r.data.order.discount_price || (r.data.order.discount_price && r.data.order.discount_price <= 0)) {
             		$(".discountPrice").parent().hide();
             }
             //价格
-            $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100));
+            $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money  || r.data.order.order_money) / 100));
             $(".totalPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
             if (!r.data.order.isLiveActive) {
                 $(".origin-price-container").hide();
@@ -304,9 +304,11 @@ $(function () {
                   discount_price = r.data.order.discount_price;
                   var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
                   $(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
-                  $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                  if (r.data.order.discount_price && r.data.order.discount_price > 0) {
+                    $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                  }
                 }
-                $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
+                $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
                 //未支付
                 $("#card-header-bg").addClass("bg nopay-bg")
                 $("#pageTitle").addClass("status")
@@ -358,9 +360,11 @@ $(function () {
                   discount_price = r.data.order.discount_price;
                   var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
                   $(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
-                  $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                  if (r.data.order.discount_price && r.data.order.discount_price > 0) {
+                    $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                  }
                 }
-                $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
+                $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
 
 
 

+ 6 - 6
src/jfw/modules/bigmember/src/entity/portrait_screen.go

@@ -19,7 +19,7 @@ const (
 	must_match                = `{"bool":{"must":[%s]}}`
 	should_match              = `{"bool":{"should":[%s],"minimum_should_match": 1}}`
 	NewMustSearch             = `{"query":{"bool":{"must":[%s]}}%s}`
-	ListSearchLimit           = `,"_source":[%s],"sort":[{"publishtime":{"order":"desc"}}],"from":%d,"size":%d`
+	ListSearchLimit           = `,"_source":[%s],"sort":[{"%s":{"order":"desc"}}],"from":%d,"size":%d`
 
 	newBiddingSearchShowSql = `{"query":{"filtered":{"filter":{"bool":{"must":[%s,{"range":{"firsttime":{"gte":"%d"}}}]}}}},"aggs":{"group_area":{"terms":{"field":"area","size":40}},"group_scopeArr":{"terms":{"field":"subscopeclass","size":20}}}}`
 )
@@ -219,8 +219,8 @@ func (pwp *PortraitProjectScreen) GetWinnerList() (list []map[string]interface{}
 	}
 	start, limit := (pwp.PageNum-1)*pwp.PageSize, pwp.PageSize
 	//列表查询
-	listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(ListSearchLimit, `"_id","projectname","bidamount","title","publishtime","subtype","toptype","area"`, start, limit))
-	log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
+	listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(ListSearchLimit, `"_id","projectname","bidamount","title","publishtime","subtype","toptype","area"`, "publishtime", start, limit))
+	//log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
 	newData := elastic.Get(biddingIndex, biddingType, listQuery)
 
 	if newData == nil || len(*newData) == 0 {
@@ -316,7 +316,7 @@ func (pwp *PortraitProjectScreen) GetBuyerList() (list []map[string]interface{},
 	if pwp.PageNum == 1 {
 		total = elastic.Count(projectIndex, projectIndex, fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), ""))
 		if total <= 0 {
-			log.Println(fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), ""))
+			//log.Println(fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), ""))
 			return
 		}
 	} else {
@@ -325,8 +325,8 @@ func (pwp *PortraitProjectScreen) GetBuyerList() (list []map[string]interface{},
 	start, limit := (pwp.PageNum-1)*pwp.PageSize, pwp.PageSize
 
 	//列表查询
-	listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(ListSearchLimit, `"bidstatus","list.infoid","list.title","list.subtype","projectname","list.area","firsttime","area"`, start, limit))
-	log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
+	listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(ListSearchLimit, `"bidstatus","list.infoid","list.title","list.subtype","projectname","list.area","firsttime","area"`, "firsttime", start, limit))
+	//log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
 	newData := elastic.Get(projectIndex, projectType, listQuery)
 
 	if newData == nil || len(*newData) == 0 {

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

@@ -654,7 +654,7 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 			if len(*data) > 0 && err {
 				v["i_vip_status"] = qutil.Int64All((*data)["i_vip_status"])
 				ojy := qutil.ObjToMap((*data)["o_jy"])
-				v["i_pp_status"] = qutil.IntAllDef((*ojy)["i_pp_status"], 0) //i_pp_status : -1 到期  0未购买 1已购买
+				v["i_pp_status"] = qutil.IntAllDef((*ojy)["i_ppstatus"], 0) //i_pp_status : -1 到期  0未购买 1已购买
 			}
 		}
 		//

+ 8 - 3
src/web/staticres/common-module/big-member/js/high_set.js

@@ -78,7 +78,7 @@ var highSet = new Vue({
   watch: {
     // 监听初始时间 如果结束时间小于初始时间 则两个调换位置
     'conf.start': function(newVal) {
-      console.log(this.conf.end, newVal)
+      // console.log(this.conf.end, newVal)
       if (this.conf.end < newVal) {
         this.conf.start = this.conf.end
         this.conf.end = newVal
@@ -232,7 +232,8 @@ var highSet = new Vue({
           success: function (res) {
             if (res.error_code == 0) {
               loading.clear()
-              _this.filterInitData = res.data
+              _this.filterInitData.areaArr = res.data.areaArr || []
+              _this.filterInitData.scopeArr = res.data.scopeArr || []
               // _this.initSelector(res.data)
             } else {
               _this.showToast(res.error_msg)
@@ -356,8 +357,9 @@ var highSet = new Vue({
         obj[s.name] = s.value
         resArr.push(obj)
       })
-      console.log(resArr, '过滤好的行业数据')
+      // console.log(resArr, '过滤好的行业数据')
       this.$refs.industryCom.formatIndustryData(resArr)
+      this.$refs.industryCom.canClick = false
       // this.$refs.industryCom.setState(this.selectIndustryList)
     },
     // 分析方式
@@ -376,11 +378,13 @@ var highSet = new Vue({
         this.$refs.projectAreaSelector.setState(this.selectAreaList)
       } else if (data.name == 'industryItem') {
         this.$refs.industryCom.setState([])
+        this.$refs.industryCom.canClick = false
       } else if (data.name == 'dateItem') {
         
       }
     },
     onConfirm: function (data) {
+      // console.log(data, 'data')
       if (data.name === 'areaItem') {
         if (data.data.length === 0) {
           this.conf.area = '全国'
@@ -401,6 +405,7 @@ var highSet = new Vue({
       } else if (data.name === 'industryItem') {
         if (data.data.length === 0) {
           this.conf.industry = '全部'
+          this.selectIndustryList = data.data
         } else {
           this.conf.industry = data.data.join(',')
           this.selectIndustryList = data.data

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

@@ -219,7 +219,7 @@ var vm = new Vue({
       // 订单金额
       this.orderInfo.orderMoney = this.moneyFormat(order.order_money)
       // 实付金额
-      this.orderInfo.payMoney = this.moneyFormat(order.order_money)
+      this.orderInfo.payMoney = this.moneyFormat(order.pay_money || order.order_money)
 
       if (info.transaction_id) {
         this.orderInfo.paymentId = info.transaction_id // 支付单号
@@ -277,7 +277,7 @@ var vm = new Vue({
       var payTime = order.pay_time ? this.time2Stamp(order.pay_time) : ''
       var payWay = order.pay_way ? order.pay_way : ''
 
-      var discountPrice = 0
+      var discountPrice = ''
       if (order.discount_price) {
         discountPrice = utils.formatMoney(order.discount_price / 100)
         discountPrice = '-¥' +  discountPrice
@@ -323,7 +323,7 @@ var vm = new Vue({
         {
           label: '实付金额',
           split: ':',
-          text: (order.pay_money==0) ? '¥' + this.moneyFormat(order.pay_money) : ''
+          text: (order.pay_money > 0)  ? '¥' + this.moneyFormat(order.pay_money) : ''
         },
         {
           label: '产品类型',
@@ -454,6 +454,9 @@ var vm = new Vue({
 
       function formatTimeText (type) {
         var result = ''
+        if (typeof type === "string") {
+          type = type.replace(/-/g, '/')
+        }
         var tempDate = new Date(type)
         if (typeof tempDate.getTime() === 'number') {
           result = tempDate.pattern('yyyy/MM/dd')

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

@@ -561,7 +561,7 @@ var vm = new Vue({
         info.totalPrice = Number(order.order_money) + Number(order.discount_price)
         info.totalPrice = utils.formatMoney(info.totalPrice);
       }
-      info.payPrice = utils.formatMoney(order.order_money)
+      info.payPrice = utils.formatMoney(order.pay_money || order.order_money)
 
       switch (productType) {
         case '历史数据': {
@@ -2078,6 +2078,9 @@ var vm = new Vue({
 
       function formatTimeText (type) {
         var result = ''
+        if (typeof type === "string") {
+          type = type.replace(/-/g, '/')
+        }
         var tempDate = new Date(type)
         if (typeof tempDate.getTime() === 'number') {
           result = tempDate.pattern('yyyy/MM/dd')

+ 3 - 0
src/web/templates/areaPack/pc/page_order.html

@@ -235,6 +235,9 @@
                     }
                     function formatTimeText (type) {
                         var result = ''
+                        if (typeof type === "string") {
+                            type = type.replace(/-/g, '/')
+                        }
                         var tempDate = new Date(type)
                         if (typeof tempDate.getTime() === 'number') {
                             result = tempDate.Format('yyyy/MM/dd')

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

@@ -616,7 +616,7 @@ function isWechat() {
                               <span class="bid_phonetext">咨询 400-108-6670 了解更多</span>
                             </div>
                             <div class="contacts" v-if="buyerInfo && buyerInfo.contactList">
-                              <p class="contacts-title">历史项目联系方式</p>
+                              <p class="contacts-title">采购单位通讯录</p>
                               <p class="contacts-list" v-for="item in buyerInfo.contactList">
                                 <span class="c-l-time" v-if="item.date">成交时间:<span v-html="item.date"></span></span>
                                 <span class="c-l-way" v-if="item.contact">联系方式:<span v-html="item.contact"></span></span>
@@ -750,7 +750,7 @@ function isWechat() {
                             <span class="bid_phonetext">咨询 400-108-6670 了解更多</span>
                           </div>
                           <div class="contacts" v-if="winnerInfo && winnerInfo.contactList">
-                            <p class="contacts-title">历史项目联系方式</p>
+                            <p class="contacts-title">企业通讯录</p>
                             <p class="contacts-list" v-for="item in winnerInfo.contactList">
                               <span class="c-l-time" v-if="item.date">成交时间:<span v-html="item.date"></span></span>
                               <span class="c-l-way" v-if="item.contact">联系方式:<span v-html="item.contact"></span></span>

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

@@ -684,6 +684,9 @@
         },
         formatTimeText (type) {
           var result = ''
+          if (typeof type === "string") {
+            type = type.replace(/-/g, '/')
+          }
           var tempDate = new Date(type)
           if (typeof tempDate.getTime() === 'number') {
               result = tempDate.Format('yyyy/MM/dd')

+ 1 - 1
src/web/templates/weixin/commonPay/paySuccess.html

@@ -79,7 +79,7 @@
             继续浏览
         </button>
     </div>
-    {{else if or .T.doType "dataPack" .T.doType "areaPack"}}
+    {{else if or (eq .T.doType "dataPack") (eq .T.doType "areaPack")}}
         <div class="bottom_button j-button-group">
             <button id ="order" class="j-button-confirm" onclick="window.location.href = '/weixin/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
                 查看订单

+ 10 - 6
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -227,11 +227,11 @@
                         $(".productType").text("超级订阅(试用)");
                     }
                 }
-                if (r.data.order.discount_price==undefined) {
+                if (!r.data.order.discount_price || (r.data.order.discount_price && r.data.order.discount_price <= 0)) {
             		    $(".discountPrice").parent().hide();
                 }
                 //价格
-                $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100));
+                $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100));
                 $(".totalPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
 
                 //优惠码
@@ -570,9 +570,11 @@
                       discount_price = r.data.order.discount_price;
                       var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
                       $(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
-                      $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                      if (r.data.order.discount_price && r.data.order.discount_price > 0) {
+                          $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                      }
                     }
-                    $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
+                    $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
                     //未支付
                     $("#card-header-bg").addClass("bg nopay-bg")
                     $("#pageTitle").addClass("status")
@@ -638,9 +640,11 @@
                       discount_price = r.data.order.discount_price;
                       var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
                       $(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
-                      $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                      if (r.data.order.discount_price && r.data.order.discount_price > 0) {
+                        $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                      }
                     }
-                    $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
+                    $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
                     $("#card-header-bg").addClass("bg finish-bg")