Browse Source

修改测试BUG

shenjj 7 years ago
parent
commit
9e3094ac90

+ 139 - 35
components/mobile/store/StoreDetail.vue

@@ -1,17 +1,20 @@
 <template>
   <div class="store-detail mobile-content">
+    <div class="lookjianjie" @click="activeType = 'detail'">简介<i class="iconfont icon-fanhui"></i></div>
     <div class="store-logo">
       <div class="store-logo-box">
         <img :src="store.logoUrl || '/images/component/default.png'"/>
         <i v-if="showIcon" class="iconfont icon-shoucang" :style="isFocus === 'true'?'color:#ff7800':'color: #ddd'" @click="collectStore"></i>
       </div>
-      <div class="store-switch-item">
-        <span :class="activeType=='product'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='product'">产品</span>
-        <span :class="activeType=='detail'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='detail'">介绍</span>
-      </div>
+      <!--<div class="store-switch-item">-->
+        <!--<span :class="activeType=='product'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='product'">产品</span>-->
+        <!--<span :class="activeType=='detail'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='detail'">介绍</span>-->
+      <!--</div>-->
     </div>
-
-    <div class="store-info" v-if="activeType=='detail'">
+    <div class="mobile-modal" @touchmove.self="preventTouchMove($event)" v-show="activeType==='detail'">
+      <div class="mobile-modal-box mobile-link-en mobile-link-en-content">
+        <div class="mobile-modal-header">企业信息|{{store.storeName}}<i @click="activeType = 'store'" class="icon-guanbi iconfont"></i></div>
+        <div class="store-info" >
       <div class="store-description">
         <h4>主营产品</h4>
         <p class="content" v-if="store.description">
@@ -75,12 +78,14 @@
       </ul>
      </div>
     </div>
+      </div>
+    </div>
   <!--  <div class="com-none-state" v-if="activeType=='detail'">
       <img src="/images/mobile/@2x/empty-collect.png">
       <p>抱歉,暂无店铺简介</p>
       <nuxt-link to="/">返回首页</nuxt-link>
     </div>-->
-    <div class="product-store" v-else>
+    <div class="product-store">
       <div class="search-content">
         <input type="text" v-model="keyword" placeholder="品牌/物料名称(类目)/型号/规格" @keyup.13="search">
         <span @click="search" style="height:0.5rem;line-height:0.5rem;">
@@ -95,47 +100,52 @@
                 <div class="name">品牌:</div>
                 <div class="text">{{item.brandNameEn}}</div>
               </div>
+              <div class="fl">
+                <div class="name">交期(天):</div>
+                <div class="text" style="color: #ef5042" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
+                <div class="text" style="color: #ef5042" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
+              </div>
             </div>
             <div class="list">
-              <div class="fl" style="width: 100%">
+              <div class="fl">
                 <div class="name">物料名称(类目):</div>
                 <div class="text" style="color: #3f84f6">{{item.kindNameCn || '-'}}</div>
               </div>
-
+              <div class="fl">
+                <div class="name">库存:</div>
+                <div class="text">{{item.reserve || '-'}}</div>
+              </div>
             </div>
             <div class="list">
-              <div class="fl" style="width: 100%">
+              <div class="fl">
                 <div class="name">型号:</div>
                 <div class="text">{{item.code || '-'}}</div>
               </div>
+              <div class="fl">
+                <div class="name">起拍:</div>
+                <div class="text">{{item.minBuyQty || '-'}}</div>
+              </div>
             </div>
             <div class="list">
-              <div class="fl" style="width: 100%">
+              <div class="fl">
                 <div class="name">规格:</div>
                 <div class="text">{{item.spec || '-'}}</div>
               </div>
-            </div>
-
-            <div class="list">
-              <div class="fl" style="width: 100%">
+              <div class="fl">
                 <div class="name">包装:</div>
                 <div class="text">{{item.packaging || '无包装信息'}}</div>
-                <div class="textinfo" v-if="item.breakUp">可拆卖</div>
               </div>
             </div>
-
             <div class="list">
-              <div class="name">生产日期:</div>
-              <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
-            </div>
-
-            <div class="list">
-              <div class="fl" style="width: 100%; ">
-                <div class="name">交期(天):</div>
-                <div class="text" style="color: #ef5042" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
-                <div class="text" style="color: #ef5042" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
-                <div v-if="item.minBuyQty" style="display: inline-block;margin-left: 0.2rem"><span class="order-tag">订</span>{{item.minBuyQty}}起订</div>
-                <div v-if="item.reserve" style="display: inline-block;margin-left: 0.2rem"><span class="order-tag reserve-tag">库</span>{{item.reserve}}</div>
+              <div class="fl" @click="goAttach(item.attach)">
+                <div class="name">规格书:</div>
+                <div class="text">
+                  <i class="iconfont icon-pdf" :class="{'active': item.attach && item.attach !== '' && item.attach !== '1'}"></i>
+                </div>
+              </div>
+              <div class="fl">
+                <div class="name">生产日期:</div>
+                <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
               </div>
             </div>
             <div class="list">
@@ -154,7 +164,15 @@
                 </ul>
               </div>
             </div>
-
+            <div class="list clearfix">
+              <div class="pull-left cancat" @click="cancatAlert(item)">
+                <i class="iconfont icon-kefu1"></i>联系买家
+              </div>
+              <div class="pull-right clearfix">
+                <div class="pull-left">加入购物车</div>
+                <div class="pull-left">立即购买</div>
+              </div>
+            </div>
           </div>
           </div>
       </div>
@@ -175,7 +193,7 @@
   export default {
     data () {
       return {
-        activeType: 'product',
+        activeType: '',
         collectResult: '收藏成功',
         timeoutCount: 0,
         clickTel: false,
@@ -263,6 +281,25 @@
       }
     },
     methods: {
+      goAttach: function (url) {
+        if (this.user.logged) {
+          console.log(this.component)
+          if (url && url !== '1') {
+            window.open(url)
+          } else {
+            if (!url) {
+              this.collectResult = '该产品暂无数据手册'
+              this.timeoutCount++
+            } else {
+              this.collectResult = '数据手册地址错误'
+              this.timeoutCount++
+            }
+          }
+        } else {
+          this.url = this.$route.fullPath
+          this.showLoginBox = true
+        }
+      },
       scroll: function () {
         let tbodyObj = document.getElementById('product-body')
         let theadObj = document.getElementById('product-head')
@@ -335,6 +372,13 @@
   .mobile-header {
     border-bottom: 0px !important;
   }
+  .mobile-modal .mobile-link-en-content {
+    width: 7.04rem;
+    margin-top: 0rem;
+    left: 0.2rem;
+    background: #f7f7f7;
+    top: 5%;
+  }
   .store-detail {
     margin: 0 auto;
     margin-bottom: 1.2rem;
@@ -342,13 +386,13 @@
     background: #f7f7f7;
     height: 100%;
     .store-logo {
-      height: 4.49rem;
+      height: 3.27rem;
       width: 100%;
       display: inline-block;
       line-height: 2.13rem;
       background: #fff;
       text-align: center;
-      background: url('/images/mobile/@2x/brand-bg2.jpg') no-repeat;
+      background: url('/images/mobile/@2x/brand-bg2.png') no-repeat;
       background-size: cover;
       position: relative;
       .store-logo-box {
@@ -408,6 +452,9 @@
     .store-info {
       background: #f7f7f7;
       width: 100%;
+      bottom: 0;
+      overflow-y: scroll;
+      height: 9rem;
       h4{
         width: 100%;
         text-align: left;
@@ -475,7 +522,7 @@
       .store-description{
         background: #fff;
         width: 6.96rem;
-        margin: .2rem auto;
+        margin: 0 auto .2rem;
         border-radius: .1rem;
         .content {
           text-indent:2em;
@@ -570,7 +617,7 @@
           zoom: 1;
         }
         .fl {
-          width: 4.4rem;
+          width: 3.2rem;
           float: left;
           overflow: hidden;
           text-overflow: ellipsis;
@@ -599,7 +646,7 @@
           font-size: 0.28rem
         }
         .table {
-          width: 5rem;
+          width: 5.25rem;
           margin-bottom: 0;
           margin-top: 0;
           margin-left: 0.1rem;
@@ -641,6 +688,33 @@
             }
           }
         }
+        .pull-right {
+          div {
+            color: #3f84f6;
+            font-size: 0.28rem;
+            border-radius: 0.07rem;
+            border: 1px solid #3f84f6;
+            background: #fff;
+            width: 2rem;
+            line-height: 0.54rem;
+            height: 0.54rem;
+            text-align: center;
+          }
+          div:last-child {
+            margin-left: 0.2rem;
+            color: #fff;
+            background: #3f84f6;
+          }
+        }
+        i {
+          &.icon-pdf {
+            color: #929292;
+            font-size: 0.4rem;
+          }
+          &.active {
+            color: #eb062b;
+          }
+        }
       }
     }
     .product-store {
@@ -781,4 +855,34 @@
       border: 1px solid #376ff3;
     }
   }
+  .cancat {
+    height: 0.56rem;
+    line-height: 0.56rem;
+    border: 1px solid #3f84f6;
+    color: #3f84f6;
+    font-size: 0.26rem;
+    text-align: center;
+    border-radius: 3px;
+    padding: 0 0.1rem;
+    overflow: hidden;
+    width: auto;
+    i {
+      font-size: 0.26rem;
+    }
+  }
+  .lookjianjie {
+    position: fixed;
+    top: 0;
+    right: 0.4rem;
+    font-size: 0.28rem;
+    color: #fff;
+    z-index: 11;
+    line-height: 0.88rem;
+    i {
+      font-size: 0.28rem;
+      color: #fff;
+      transform: rotate(180deg);
+      display: inline-block;
+    }
+  }
 </style>

+ 25 - 1
pages/mobile/center/vendor/product.vue

@@ -47,7 +47,8 @@
           <!--v-if="providerType == 'enterprise'"-->
           <div class="clearfix" v-if="providerType === 'enterprise'">
             <div class="pull-right add" v-if="providerType === 'enterprise'" @click="addProtoperson(item)" :class="{noadd: item.addProductPerson}">加入个人产品</div>
-            <div class="pull-right look" @click="lookProductitem(item.id, item)">查看产品</div>
+            <div class="pull-right look" @click="lookProductitem(item.id, item)" v-if="item.batchCount">查看产品</div>
+            <div class="pull-right look" @click="toAddpro(item)" v-else>编辑上架</div>
           </div>
         </div>
         <div v-else>
@@ -297,6 +298,29 @@
       }
     },
     methods: {
+      toAddpro(list) {
+        let item = {
+          brandNameEn: list.pbranden,
+          kindNameCn: list.kinden || list.kind,
+          code: list.pcmpcode,
+          spec: list.spec,
+          prices: [{
+            end: '',
+            rMBNTPrice: '',
+            rMBPrice: '',
+            start: '1'
+          }],
+          minBuyQty: 1,
+          minPackQty: 1,
+          productid: list.id,
+          prodNum: list.prodNum,
+          currencyName: this.$store.state.option.storeStatus.data.enType === 'MAINLAND' ? 'RMB' : 'USD',
+          breakUp: false
+        }
+        this.$store.commit('product/brand/GET_ONSALE_DETAILS_SUCCESS', item)
+        localStorage.setItem('ProductListItem', JSON.stringify(item))
+        this.$router.push(`/mobile/center/vendor/productdetails?formurl=productlist&return=goBack`)
+      },
       update(item) {
         this.$store.commit('product/brand/GET_ONSALE_DETAILS_SUCCESS', item)
         this.$router.push('/mobile/center/vendor/productdetails')

+ 3 - 2
pages/mobile/center/vendor/productList/index.vue

@@ -109,8 +109,8 @@
       <div class="deleteKuang" v-if="showLogout">
         <div class="kuangContent">
           <div class="title">系统提示</div>
-          <div class="titleinfo">是否删除此信息</div>
-          <div class="info" v-if="isUploadpro">*存在已上架信息</div>
+          <div class="titleinfo">是否删除此产品</div>
+          <div class="info" v-if="isUploadpro">*该产品已上架</div>
           <div class="K_btn">
             <div class="cancelBtn" @click="showLogout = false">取消</div>
             <div class="answerBtn" @click="ReadyDelete()">确定</div>
@@ -162,6 +162,7 @@
             start: '1'
           }],
           minBuyQty: 1,
+          minPackQty: 1,
           productid: this.$route.query.uuid,
           prodNum: this.ItemInfo.prodNum,
           currencyName: this.$store.state.option.storeStatus.data.enType === 'MAINLAND' ? 'RMB' : 'USD',

+ 35 - 9
pages/mobile/center/vendor/productdetails.vue

@@ -38,7 +38,7 @@
         </div>
         <div class="pull-right">
           <span class="name">库存:</span>
-          <input type="tel" placeholder="数量" v-model="chooseItem.reserve" class="input reserveInput" maxlength="9" />
+          <input type="tel" placeholder="数量" v-model="chooseItem.reserve" class="input reserveInput" maxlength="9" @blur="blurPrice(chooseItem.reserve)" />
         </div>
       </div>
       <div class="list clearfix">
@@ -54,7 +54,7 @@
         </div>
         <div class="pull-right">
           <span class="name">生产日期:</span>
-          <input type="text" placeholder="2018-02-05" v-model="chooseItem.produceDate" class="input dateInput" maxlength="12" />
+          <input type="text" placeholder="2018-02-05" v-model="chooseItem.produceDate" class="input dateInput" maxlength="12" @input="changeProduceDate(chooseItem.produceDate)" />
         </div>
       </div>
       <div class="list clearfix">
@@ -189,12 +189,29 @@
       }
     },
     methods: {
+      // 库存失去焦点
+      blurPrice(str) {
+        if (this.chooseItem.reserve === 0) {
+          this.timeoutCount++
+          this.collectResult = '库存数量不能小于0'
+        } else if (!/^\d{1,9}$/.test(this.chooseItem.reserve)) {
+          this.timeoutCount++
+          this.collectResult = '库存数量只能输入正整数'
+        } else if (this.chooseItem.reserve.length > 9) {
+          this.timeoutCount++
+          this.collectResult = '库存数量不能大于10亿'
+        }
+      },
+      // 生成日期截取
+      changeProduceDate(str) {
+        if (this.baseUtils.getRealLen(str) > 20) {
+          this.chooseItem.produceDate = this.baseUtils.cutOutString(str, 12)
+        }
+      },
       // 标签截取
       onChangeInput(str) {
-        console.log(str)
         if (this.baseUtils.getRealLen(str) > 20) {
           this.chooseItem.tag = this.baseUtils.cutOutString(str, 20)
-          console.log(this.chooseItem.tag)
         }
       },
       closeAlert() {
@@ -241,10 +258,14 @@
         } else if ((!this.chooseItem.breakUp && this.chooseItem.minBuyQty) && this.chooseItem.minBuyQty % this.chooseItem.minPackQty !== 0) {
           this.timeoutCount++
           this.collectResult = '不可拆卖时,起订量必须是包装数量的倍数'
-          if (this.chooseItem.minPackQty > this.chooseItem.minBuyQty) {
-            this.chooseItem.minBuyQty = this.chooseItem.minPackQty
+          if (!this.chooseItem.minPackQty) {
+            this.chooseItem.minPackQty = 1
           } else {
-            this.chooseItem.minBuyQty = this.chooseItem.minBuyQty - this.chooseItem.minBuyQty % this.chooseItem.minPackQty
+            if (this.chooseItem.minPackQty > this.chooseItem.minBuyQty) {
+              this.chooseItem.minBuyQty = this.chooseItem.minPackQty
+            } else {
+              this.chooseItem.minBuyQty = this.chooseItem.minBuyQty - this.chooseItem.minBuyQty % this.chooseItem.minPackQty
+            }
           }
         }
         this.chooseItem.prices[0].start = this.chooseItem.minBuyQty
@@ -362,6 +383,7 @@
       },
       // 单价失去焦点
       rMBPriceBlur(item) {
+        if (item.rMBPrice === '' || !item.rMBPrice) { return false }
         if (!/^[0-9]+([.]{1}[0-9]+)?$/.test(item.rMBPrice)) {
           this.timeoutCount++
           this.collectResult = '单价只能输入数字'
@@ -441,7 +463,7 @@
           this.timeoutCount++
           this.collectResult = '交期只能输入数字'
           return false
-        } else if (!this.chooseItem.packaging || this.chooseItem.packaging || this.chooseItem.packaging === undefined) {
+        } else if (!this.chooseItem.packaging || this.chooseItem.packaging === '' ) {
           this.timeoutCount++
           this.collectResult = '请选择规格信息'
           return false
@@ -513,7 +535,11 @@
               this.timeoutCount++
               this.collectResult = '保存成功'
               setTimeout(() => {
-                this.goLastPage()
+                if (!this.$route.query.return) {
+                  this.goLastPage()
+                } else {
+                  this.$router.replace(`/mobile/center/vendor/productList?uuid=${this.chooseItem.productid}`)
+                }
               }, 300)
             } else {
               this.timeoutCount++

+ 4 - 4
pages/mobile/order/details.vue

@@ -138,8 +138,8 @@
           <!--</div>-->
         <!--</div>-->
         <div class="clearfix">
-          <div class="name pull-left">收地址</div>
-          <div class="pull-right">
+          <div class="name pull-left">收地址</div>
+          <div class="pull-right" style="text-align: left">
             <div class="name" style="margin: 0.22rem 0 0 0">{{orderList.area.area}} &nbsp;&nbsp;{{orderList.area.detailAddress}}</div>
           </div>
           <div style="clear:both"></div>
@@ -228,7 +228,7 @@
             <div class="sendGoods" @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" v-if="orderList.installmentId && (orderList.status === 503 || orderList.status === 504 || orderList.status === 524 ) && orderList.installment.status !== 505 && !orderList.againUpload">立即付款</div>
             <div class="" @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" v-if="orderList.installmentId && (orderList.status === 503 || orderList.status === 504 || orderList.status === 524 ) && orderList.installment.status !== 505 && orderList.againUpload">重新上传</div>
             <div class="" @click="cancelOrder(orderList)" v-if="orderList.status === 503 || orderList.status === 501 || orderList.status === 502">取消订单</div>
-            <div @click="paidTime(orderList)" class="" v-if="_getHoursFromNow(orderList.paytime) > sellsendGoodsTime - 1 && orderList.status !== 404 ">提醒发货</div>
+            <div @click="paidTime(orderList)" class="" v-if="_getHoursFromNow(orderList.paytime) > sellsendGoodsTime - 1 && orderList.status !== 404 && orderList.status !== 524 && orderList.status !== 520 && orderList.status !== 405 && orderList.status !== 521">提醒发货</div>
             <!--<div @click="lookLogisticsInfo(orderList)" class="" v-if="orderList.status === 404 || orderList.status === 520 || orderList.status === 405 || orderList.status === 521">查看物流</div>-->
           </template>
           <template v-else>
@@ -528,7 +528,7 @@
         }
       },
       created() {
-        if (this.orderList.lgtId && this.vendorType !== 'buyer') {
+        if (this.orderList.lgtId) {
           this.$http.get(`/trade/logistics/${this.orderList.lgtId}`).then(data => {
             this.$http.get(`/kdn/logistics/query?companyName=${data.data.companyName}&logisticsCode=${data.data.number}`).then(res => {
               let str = res.data.traces

+ 1 - 1
pages/mobile/order/index.vue

@@ -109,7 +109,7 @@
             <div class="pull-right" @click="cancelOrder(item)" v-if="item.status === 503 || item.status === 501 || item.status === 502">取消订单</div>
             <div class="pull-right" @click="deleteOrder(item)" v-if="item.status === 602 || item.status === 603 || item.status === 315 || item.status === 604 || item.status === 605 || item.status === 606">
               删除订单</div>
-            <div @click="paidTime(item)" class="pull-right" v-if="_getHoursFromNow(item.paytime) > sellsendGoodsTime - 1 && item.status !== 404 && item.status !== 524">提醒发货</div>
+            <div @click="paidTime(item)" class="pull-right" v-if="_getHoursFromNow(item.paytime) > sellsendGoodsTime - 1 && item.status !== 404 && item.status !== 524 && item.status !== 520 && item.status !== 405 && item.status !== 521">提醒发货</div>
             <div @click="lookLogisticsInfo(item)" class="pull-right" v-if="item.status === 404 || item.status === 520 || item.status === 405 || item.status === 521">查看物流</div>
             <div class="pull-right cancat" @click="cancatAlert(item)">
               <i class="iconfont icon-kefu1"></i>联系卖家

BIN
static/images/mobile/@2x/brand-bg2.png