Forráskód Böngészése

首页询价、求购询价、手机计数器修改

gaoxm 7 éve
szülő
commit
0785b234e0

+ 25 - 23
components/applyPurchase/PublishApply.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="publish-apply">
-    <div class="good-purchaser">
+    <!--<div class="good-purchaser">
       <p class="good-purchaser-title">
         <img src="/images/applyPurchase/good-purchaser-title.png" alt="">
       </p>
@@ -10,10 +10,10 @@
           <span v-text="goodMan.name"></span>
         </li>
       </ul>
-    </div>
+    </div>-->
     <div class="publish-area">
       <div class="publish-form-area">
-        <p>单个求购</p>
+        <p>单个发布</p>
         <div>
           <div class="form-item">
             <span>
@@ -93,7 +93,7 @@
         <a @click="goPublish()">发布求购</a>
       </div>
       <div class="publish-upload">
-        <h1>批量求购</h1>
+        <h1>批量发布</h1>
         <h2>3秒一键配单采购</h2>
         <label>
           <img src="/images/applyPurchase/upload.png" alt="" />
@@ -116,9 +116,9 @@
       <table>
         <thead>
           <tr>
-            <th width="62">排名</th>
-            <th width="160">型号</th>
-            <th width="92">求购次数</th>
+            <th width="73">排名</th>
+            <th width="272">型号</th>
+            <th width="100">求购次数</th>
           </tr>
         </thead>
         <tbody>
@@ -543,7 +543,7 @@
       float: left;
       text-align: center;
     }
-    .good-purchaser {
+    /*.good-purchaser {
       width: 225px;
       .good-purchaser-title {
         height: 55px;
@@ -574,14 +574,15 @@
           }
         }
       }
-    }
+    }*/
     .publish-area {
-      width: 549px;
+      width: 644px;
       text-align: center;
       .publish-form-area {
-        width: 243px;
+        width: 289px;
         float: left;
         height: 100%;
+        margin-left: 12px;
         p {
           padding-top: 8px;
           font-size: 22px;
@@ -598,6 +599,7 @@
               width: 114px;
               text-align: right;
               display: inline-block;
+              color: #333;
               i {
                 position: relative;
                 top: 2px;
@@ -651,9 +653,9 @@
             }
             input {
               font-size: 12px;
-              width: 106px;
-              height: 18px;
-              line-height: 18px;
+              width: 162px;
+              height: 20px;
+              line-height: 20px;
               border-radius: 2px;
               padding: 0 3px;
               box-shadow: none;
@@ -666,14 +668,14 @@
           }
         }
         >a {
-          width: 90px;
+          width: 100px;
           height: 25px;
           line-height: 25px;
           background: #3975f4;
           color: #fefefe;
           font-size: 16px;
           display: block;
-          margin: 0 auto;
+          margin: -8px 29px 0px 150px;
           border-radius: 3px;
           cursor: pointer;
         }
@@ -733,12 +735,12 @@
       }
     }
     .apply-rank {
-      width: 317px;
+      width: 451px;
       margin-right: 0;
-      background: url('/images/applyPurchase/rank-title.png') no-repeat;
+      background: url('/images/applyPurchase/rank-title1.png') no-repeat;
       background-color: #fff;
-      background-size: 319px 74px;
-      background-position: -3px -2px;
+      background-size: 451px 74px;
+      background-position: -1px -2px;
       table {
         margin: 76px auto 0;
         width: 98%;
@@ -770,7 +772,7 @@
                 color: #f6682f;
                 font-size: 12px;
                 >div {
-                  width: 62px;
+                  width: 74px;
                   span {
                     font-size: 16px;
                   }
@@ -778,12 +780,12 @@
               }
               &:nth-child(2) {
                 >div {
-                  width: 160px;
+                  width: 273px;
                 }
               }
               &:nth-child(3) {
                 >div {
-                  width: 92px;
+                  width: 102px;
                 }
               }
               >div {

+ 43 - 18
components/home/floor/FloorList.vue

@@ -6,7 +6,7 @@
       <!--<div v-if="purchaseManListData && false"></div>-->
       <div class="banner">
         <ul class="seek-banner">
-          <li><a href="/store/33069557578d44e69bd91ad12d28a8d4" target="_blank"><img src="/images/all/banner-cuxiao001.jpg" alt=""></a></li>
+          <!--<li><a href="/store/33069557578d44e69bd91ad12d28a8d4" target="_blank"><img src="/images/all/banner-cuxiao001.jpg" alt=""></a></li>-->
           <li>
             <div class="banner-cuxiao">
               <div class="wrap">
@@ -16,7 +16,10 @@
                 <div class="list-head">
                   <span>发布时间</span>
                   <span>买家名称</span>
+                  <span>品牌</span>
+                  <span>类目(产品名称)</span>
                   <span>型号</span>
+                  <span>规格</span>
                   <span>操作</span>
                 </div>
                 <ul>
@@ -26,7 +29,10 @@
                       <span :title="user.logged ? purchaseMan.inquiry.enterprise.enName : null" v-if="purchaseMan.inquiry && purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName">{{[purchaseMan.inquiry.enterprise.enName, user] | enterpriseFilter}}</span>
                       <span :title="user.logged ? purchaseMan.userName : null" v-else>{{[purchaseMan.userName, user] | userNameFilter}}</span>
                     </div>
-                    <div :title="purchaseMan.cmpCode">{{purchaseMan.cmpCode}}</div>
+                    <div :title="purchaseMan.inbrand">{{purchaseMan.inbrand || '-'}}</div>
+                    <div :title="purchaseMan.prodTitle">{{purchaseMan.prodTitle || '-'}}</div>
+                    <div :title="purchaseMan.cmpCode">{{purchaseMan.cmpCode || '-'}}</div>
+                    <div :title="purchaseMan.spec">{{purchaseMan.spec || '-'}}</div>
                     <div>
                       <div class="is-say-price" v-if="purchaseMan.remainingTime > 0 && purchaseMan.quoted == 1">已报价 <img src="/images/applyPurchase/green-check.png" alt=""></div>
                       <div v-else>
@@ -283,20 +289,21 @@
     margin-top: 20px;
     .seek-banner {
       > li{
-        float: left;
-        padding-left: 14px;
+        /*float: left;*/
+        /*padding-left: 14px;*/
         position: relative;
-        &:first-child{
-          padding-left: 0;
-        }
+        /*&:first-child{*/
+          /*padding-left: 0;*/
+        /*}*/
       }
     }
     .banner-cuxiao {
-      width: 660px;
+      width: 1190px;
       height: 253px;
-      background: url('/images/all/banner-cuxiao02.png') no-repeat;
+      background: url('/images/all/home-apply.jpg') no-repeat;
+      /*background-size: 1190px auto;*/
       .wrap {
-        width: 436px;
+        width: 874px;
         .title {
           color: #f57a2e;
           font-size: 20px;
@@ -320,17 +327,26 @@
           span {
             display: inline-block;
             &:nth-child(1) {
-              width: 70px;
+              width: 97px;
             }
             &:nth-child(2) {
-              width: 144px;
+              width: 164px;
             }
             &:nth-child(3) {
-              width: 106px;
+              width: 139px;
             }
             &:nth-child(4) {
               width: 115px;
             }
+            &:nth-child(5) {
+              width: 160px;
+            }
+            &:nth-child(6) {
+              width: 99px;
+            }
+            &:nth-child(7) {
+              width: 91px;
+            }
           }
         }
         ul {
@@ -362,17 +378,26 @@
                 color: #f57a2e;
               }
               &:nth-child(1) {
-                width: 70px;
+                width: 97px;
               }
               &:nth-child(2) {
-                width: 144px;
+                width: 164px;
               }
               &:nth-child(3) {
-                width: 106px;
+                width: 139px;
               }
               &:nth-child(4) {
                 width: 115px;
               }
+              &:nth-child(5) {
+                width: 160px;
+              }
+              &:nth-child(6) {
+                width: 99px;
+              }
+              &:nth-child(7) {
+                width: 91px;
+              }
               a {
                 width: 64px;
                 height: 22px;
@@ -411,8 +436,8 @@
       }
       .purchase {
         position: absolute;
-        left: 515px;
-        top: 184px;
+        right: 101px;
+        top: 175px;
         width: 100px;
         height: 28px;
         line-height: 28px;

+ 243 - 4
components/mobile/common/StatisticsMobile.vue

@@ -1,4 +1,4 @@
-<template>
+<!--<template>
   <div class="statistics">
     <ul class="list-inline" :style="{top: widthTop + 'rem'}" :class="{no_tran: widthTop == 2.4}">
       <li v-for="(item, index) in itemData" :style="index % 2 == 0 ? 'text-align: right;padding-right: .3rem;' : 'text-align: left;padding-left: .3rem;'">
@@ -14,6 +14,20 @@
         </span>
       </li>
     </ul>
+    <ul class="list-inline" :style="{top: widthTop + 'rem'}" :class="{no_tran: widthTop == 2.4}">
+      <li v-for="(item, index) in itemData" :style="index % 2 == 0 ? 'text-align: right;padding-right: .3rem;' : 'text-align: left;padding-left: .3rem;'">
+        <span class="number" v-if="item.type === 2">
+          <img :src="`/images/mobile/@2x/home/count${index + 1}.jpg`" alt="">
+          <span v-html="formatDouble(item.count)" style="vertical-align: middle"></span>
+          <span class="unit">条</span>
+        </span>
+        <span class="number" v-else>
+          <img :src="`/images/mobile/@2x/home/count${index + 1}.jpg`" alt="">
+          <span v-html="formatNumber(item.count, index)" style="vertical-align: middle"></span>
+          <span class="unit" v-if="item.type === 3">家</span>
+        </span>
+      </li>
+    </ul>
   </div>
 </template>
 <script>
@@ -130,19 +144,24 @@
 <style lang="scss" scoped>
   .statistics{
     position:relative;
-    height: .6rem;
+  /*  height: 0.6rem;*/
+    height: 8rem;
     border-radius:.3rem;
     background: #fff;
     margin:0 .05rem .2rem;
-    overflow: hidden;
+    /*overflow: hidden;*/
+    background: url('/images/mobile/@2x/home/countbg.png') no-repeat center;
     ul{
+      float: left;
+      width:50%;
       position:absolute;
       transition: .5s all linear;
+      border: 1px solid red;
       &:no_tran{
         transition:none;
       }
       li{
-        width:50%;
+        width:100%;
         height:.6rem;
         line-height: .6rem;
         font-size: .28rem;
@@ -182,4 +201,224 @@
       }
     }
   }
+</style>-->
+<template>
+  <div class="statistics">
+    <ul class="list-inline pull-left" :style="{top: topLeft + 'rem'}" :class="{no_tran: topLeft == 2.4}">
+      <li v-for="(item, index) in itemData" v-if="index <= 4">
+        <span  class="number">
+          <span class="name" v-html="count[index]"></span>
+          <span class="num" v-html="formatNumber(item.count, index)"></span>
+          <span class="unit" v-if="item.type === 3">家</span>
+        </span>
+      </li>
+    </ul>
+    <ul class="list-inline pull-right" :style="{top: topRight + 'rem'}" :class="{no_tran: topRight == 2.4}">
+      <li v-for="(item, index) in itemData" v-if="index > 4">
+        <span class="number">
+          <span class="name" v-html="count[index]"></span>
+          <span class="month" v-if="index === 5">(上月)</span>
+          <span class="month" v-if="index === 6">(本月)</span>
+          <span class="num" v-html="formatDouble(item.count)"></span>
+          <span class="unit" v-if="item.type === 2">条</span>
+        </span>
+      </li>
+    </ul>
+  </div>
+</template>
+<script>
+  export default {
+    name: 'StatisticsView',
+    data () {
+      return {
+        step: 1,
+        count: ['现货', '品牌', '规格书', '供应商', '店铺', '询价求购', '询价求购', '上年交易', '本年交易'],
+        topLeft: 0,
+        topRight: 0,
+        timerIndex: 0,
+        timer: {}, // 定时器实体
+        imgbox: {
+            'src': ''
+        }
+      }
+    },
+    mounted () {
+      this.$nextTick(() => {
+        this.changeIntervalL()
+        this.changeIntervalR()
+      })
+    },
+    methods: {
+      changeIntervalL () {
+        setInterval(() => {
+          this.topLeft += -1
+          let arr1 = this.itemData.slice(0, 5)
+          let arr2 = arr1.shift()
+          arr1.push(arr2)
+          if (this.topLeft === -5) {
+            this.topLeft = 0
+          }
+        }, 2400)
+      },
+      changeIntervalR () {
+        setInterval(() => {
+          this.topRight += -1
+          let arr1 = this.itemData.slice(5, 9)
+          let arr2 = arr1.shift()
+          arr1.push(arr2)
+//          this.itemDataTemp.push(this.itemData)
+          if (this.topRight === -4) {
+            this.topRight = 0
+          }
+        }, 3000)
+      },
+      formatNumber (num, type) {
+        if (num.toString().indexOf('E') !== -1) {
+          let arr = num.toString().split('E')
+          num = arr[0] * Math.pow(10, arr[1])
+        }
+        if (num > 99999999) {
+          let str2 = num.toString()
+          num = Math.floor(num / 100000000)
+          if (parseInt(str2.charAt(str2.length - 8)) > 8) {
+            num = num + 1
+          }
+          num = num + '亿'
+        } else if (num > 9999) {
+          let str = num.toString()
+          num = Math.floor(num / 10000)
+          if (parseInt(str.charAt(str.length - 4)) > 4) {
+            num = num + 1
+          }
+          num += '万'
+        } else {
+          if (type >= 7) {
+            num += '元'
+          } else if (type <= 2) {
+            num += '个'
+          } else {
+            num += ''
+          }
+        }
+        return num
+      },
+      formatDouble (num) {
+        if (num.toString().indexOf('E') !== -1) {
+          let arr = num.toString().split('E')
+          num = arr[0] * Math.pow(10, arr[1])
+        }
+        if (num > 99999999) {
+          num = (num / 100000000).toFixed(2).slice(num.length - 1, 4) + '亿'
+        } else if (num > 9999) {
+          num = (num / 10000).toFixed(2).slice(num.length - 1, 4) + '万'
+        } else {
+          num += ''
+        }
+        return num
+      }
+    },
+    computed: {
+      allCount () {
+        return this.$store.state.count.allCount.data
+      },
+      inquirySheet () {
+        let sheetNum = this.$store.state.count.inquirySheet.data.count
+        return this.formatDouble(sheetNum)
+      },
+      inquirySheetLast () {
+        let lastSheetNum = this.$store.state.count.inquirySheetLast.data.count
+        return this.formatDouble(lastSheetNum)
+      },
+      all () {
+        let count = this.$store.state.supplier.merchant.merchantAll.data
+        return count.content ? count.totalElements : '0'
+      },
+      counts () {
+        return this.$store.state.product.common.counts
+      },
+      list () {
+        let list = JSON.parse(JSON.stringify(this.$store.state.provider.stores.storeList.data))
+        console.log(list)
+        return list.totalElements
+      },
+      itemData () {
+        let str = []
+        if (this.counts.data) {
+          this.counts.data.forEach((value, key, $data) => {
+            str.push({id: $data[key].item, count: $data[key].count, type: 1})
+          })
+        }
+        str.push({id: '供应商', count: this.all ? this.all : 0, type: 3})
+        str.push({id: '本月询价单', count: this.$store.state.count.inquirySheet.data ? this.$store.state.count.inquirySheet.data.count : 0, type: 2})
+        str.push({id: '上月询价单', count: this.$store.state.count.inquirySheetLast.data ? this.$store.state.count.inquirySheetLast.data.count : 0, type: 2})
+        if (this.allCount) {
+          this.allCount.forEach((value, key, $data) => {
+            str.push({id: $data[key].item, count: $data[key].count, type: 1})
+          })
+        }
+        str.push({id: '店铺', count: this.list ? this.list : 0, type: 3})
+        str = [str[1], str[0], str[2], str[3], str[8], str[5], str[4], str[6], str[7]]
+        return str
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .statistics{
+    position:relative;
+    height: 1rem;
+    border-radius:.48rem;
+    background: #fff;
+    margin:0 .05rem .2rem;
+    overflow: hidden;
+    background: url('/images/mobile/@2x/home/countbg.png') no-repeat center;
+    background-size: auto 0.96rem;
+    ul{
+      width:50%;
+      position:relative;
+      transition: .5s all linear;
+      &:first-child{
+        margin-left: .0rem;
+      }
+      &:no_tran{
+        transition:none;
+      }
+      li{
+        width:100%;
+        text-align: center;
+        height:1rem;
+        line-height: 0.92rem;
+        font-size: .28rem;
+        font-weight: bold;
+        white-space: nowrap;
+        overflow: hidden;
+        vertical-align:top;
+        span{
+          &.number{
+            display: inline-block;
+            color:red;
+            font-size: 0.32rem;
+            height: .6rem;
+            vertical-align:middle;
+            line-height:.6rem;
+            font-weight: bold;
+            .name, .month{
+              color: #fff;
+              vertical-align:middle;
+            }
+            .month{
+              font-size: 0.22rem;
+            }
+            .unit, .num{
+              color: #feff00;
+              vertical-align:middle;
+            }
+            .num{
+              padding-left: .1rem;
+            }
+          }
+        }
+      }
+    }
+  }
 </style>

+ 1 - 0
pages/index.vue

@@ -120,6 +120,7 @@
         store.dispatch('loadAllCount', {_status: 'actived', usedFor: 'mall_home_banner'}),
         store.dispatch('loadInquirySheet', {year: nowYear, month: nowMonth}),
         store.dispatch('loadInquirySheetLast', {year: nowYear, month: LastMonth}),
+        store.dispatch('provider/findStoreListInMobil', {page: 1, count: 10, type: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT', keyword: ''}),
         store.dispatch('applyPurchase/loadMobileHomeList', {pageNumber: 1, pageSize: 5, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
       ])
     },

BIN
static/images/all/home-apply.jpg


BIN
static/images/applyPurchase/rank-title1.png


BIN
static/images/mobile/@2x/home/countbg.png