Browse Source

满席修改,显示调整

Monterey 2 years ago
parent
commit
b79904e86e

BIN
public/static/images/icon/noseat.png


+ 30 - 2
src/views/home/pages/productDetails/productDetails.vue

@@ -186,7 +186,7 @@
                 </div>
                 <div class="timeBox">
                     <div>
-                        <div v-for="item,index in dateList" :key="index" :class="{active:item.active}" @click="timeToogle(index)">
+                        <div v-for="item,index in dateList" :key="index" :class="{active:item.active, noseat:item.noseat}" @click="timeToogle(index)">
                             <span>{{item.week}}</span>
                             <span>{{item.time}}</span>
                         </div>
@@ -379,6 +379,10 @@ export default {
                         //为弹出框加入数据
                         this.setOutList =
                             res.data.commodity.departurePlace.split(",");
+                        //set on
+                        if (this.setOutList.length == 1) {
+                            this.choice.setOut = this.setOutList[0];
+                        }
                         this.travelList = [
                             {
                                 name: this.$t('productDetails.adult'),
@@ -455,6 +459,10 @@ export default {
                         //为弹出框加入数据
                         this.setOutList =
                             res.data.commodity.departurePlace.split(",");
+                        //set on
+                        if (this.setOutList.length == 1) {
+                            this.choice.setOut = this.setOutList[0];
+                        }
                         this.travelList = [
                             {
                                 name: this.$t('productDetails.adult'),
@@ -557,6 +565,7 @@ export default {
                             time: getTime(newDate, "-", "MD"),
                             timeAll:getTime(newDate, "-", "YMD"),
                             active: newDate == date.getTime() ? true : false,
+                            noseat: this.isHasSeat(getTime(newDate, "-", "YMD")) ? false : true,
                         });
                     }
                 }
@@ -574,6 +583,7 @@ export default {
                                 timeAll:getTime(newDate, "-", "YMD"),
                                 active:
                                     newDate == date.getTime() ? true : false,
+                                noseat: this.isHasSeat(getTime(newDate, "-", "YMD")) ? false : true,
                             });
                         }
                     }
@@ -765,6 +775,20 @@ export default {
             }
             return seatNum;
         },
+        isHasSeat(departDate) {
+            let seatNum = 0;
+            if (departDate != "") {
+                for (let i = 0; i < this.commodityDetails.commodity.seatInfoLst.length; i++) {
+                    if (this.commodityDetails.commodity.seatInfoLst[i].departureDate == departDate) {
+                        seatNum = this.commodityDetails.commodity.seatInfoLst[i].seatNum;
+                        if (seatNum > 0) {
+                            return true;
+                        }
+                    }
+                }
+            }
+            return false;
+        },
     },
 };
 </script>
@@ -1167,6 +1191,10 @@ export default {
                     background-color:#38d0c9;
                     color: #fff;
                 }
+                > div.noseat {
+                    background:url(../../../../../public/static/images/icon/noseat.png) no-repeat;
+                    background-size: 100% 100%;
+                }
             }
             > div:nth-child(2) {
                 width: 20%;
@@ -1244,7 +1272,7 @@ export default {
 
 .van-button--normal {
     padding: 0 25px;
-    font-size: 14px;
+    font-size: 13px;
     border-radius: 20px;
     font-weight: 600;
     border-radius: 25px;

+ 1 - 1
src/views/personal/pages/toBePaid/toBePaid.vue

@@ -422,7 +422,7 @@ export default {
 }
 .van-button--normal {
     padding: 0 25px;
-    font-size: 14px;
+    font-size: 13px;
     border-radius: 20px;
     font-weight: 600;
     border-radius: 25px;