Browse Source

修改测试BUG

shenjj 7 years ago
parent
commit
ed4becdd6e

+ 2 - 2
app.html

@@ -8,10 +8,10 @@
   <!--<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css"/>-->
   <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_0aqseo0wttvu.css">
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.css" />
-  <script src="https://wechatfe.github.io/vconsole/lib/vconsole.min.js?v=3.2.0"></script>
+  <!--<script src="https://wechatfe.github.io/vconsole/lib/vconsole.min.js?v=3.2.0"></script>-->
   {{ HEAD }}
   <script>
-    var vConsole = new VConsole();
+    // var vConsole = new VConsole();
     var _hmt = _hmt || [];
     var _paq = _paq || [];
     /* tracker methods like "setCustomDimension" should be called before "trackPageView" */

+ 1 - 1
pages/mobile/center/user/index.vue

@@ -39,7 +39,7 @@
             <p>购物车<span class="text">{{carCount && carCount >= 99 ? 99 : carCount || 0}}</span></p>
           </nuxt-link>
           <nuxt-link tag="li" to="/mobile/center/user/collect/component" class="content-line">
-            <img src="/images/mobile/center/user/comp-collect.png" alt="">
+            <img src="/images/mobile/center/user/comp-collect2.png" alt="">
             <p>器件收藏<span class="text">{{compCount.data && compCount.data >= 99 ? 99 : compCount.data || 0}}</span></p>
           </nuxt-link>
           <nuxt-link tag="li" to="/mobile/center/user/collect/store" class="content-line">

+ 2 - 0
pages/mobile/center/vendor/product.vue

@@ -300,6 +300,7 @@
       update(item) {
         this.$store.commit('product/brand/GET_ONSALE_DETAILS_SUCCESS', item)
         this.$router.push('/mobile/center/vendor/productdetails')
+        localStorage.setItem('ProductListItem', JSON.stringify(item))
       },
       offProduct(item) {
         this.showoffshelf = true
@@ -458,6 +459,7 @@
       lookProductitem: function(id, item) {
         this.chooseItem = item
         this.$store.commit('product/component/REQUEST_NOWPRODUCTINFO_SUCCESS', item)
+        localStorage.setItem('productInfoItem', JSON.stringify(item))
         this.$router.push(`/mobile/center/vendor/productList?uuid=${id}`)
         // this.$http.get(`/trade/products/goods/productid/${id}`).then(res => {
         //   this._initscroll()

+ 9 - 6
pages/mobile/center/vendor/productList/index.vue

@@ -136,6 +136,7 @@
       closeMoreinfo() {},
       update(item) {
         this.$store.commit('product/brand/GET_ONSALE_DETAILS_SUCCESS', item)
+        localStorage.setItem('ProductListItem', JSON.stringify(item))
         this.$router.push('/mobile/center/vendor/productdetails')
       },
       offFn(item) {
@@ -167,6 +168,7 @@
           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`)
       },
       deleteItem(item, index) {
@@ -194,14 +196,17 @@
         })
       }
     },
-    async asyncData({route}) {
+    async asyncData({route, store}) {
      let { data } = await axios.get(`/trade/products/goods/productid/${route.query.uuid}`)
       return {
-        vendorlist: data
+        vendorlist: data,
+        ItemInfo: store.state.product.component.nowProductInfo.data
       }
     },
     mounted() {
       this._initscroll()
+      let a = JSON.parse(localStorage.getItem('productInfoItem'))
+      this.ItemInfo = a
     },
     data() {
       return {
@@ -209,16 +214,14 @@
         showLogout: false,
         isUploadpro: false,
         collectResult: '',
-        timeoutCount: 0
+        timeoutCount: 0,
+        ItemInfo: {}
       }
     },
     components: {
       RemindBox
     },
     computed: {
-      ItemInfo() {
-        return this.$store.state.product.component.nowProductInfo.data
-      },
       cnmpCode() { // 型号
         return this.ItemInfo.pcmpcode || '-'
       },

+ 33 - 17
pages/mobile/center/vendor/productdetails.vue

@@ -3,7 +3,7 @@
     <div class="product">
       <div class="over top clearfix">
         <div class="icon" :class="chooseItem.standard ? 'standed' : 'istanded'"></div>
-        <div class="text">
+        <div class="text over">
           {{chooseItem.code}}
         </div>
       </div>
@@ -13,12 +13,16 @@
       </div>
       <div class="over list">
         <span class="name">物料名称(类目):</span>
-        <span>{{chooseItem.kindNameCn}}</span>
+        <span>{{chooseItem.kindNameCn || '-'}}</span>
       </div>
       <div class="over list clearfix">
-        <div class="pull-left">
-          <span class="name">型号:</span>
-          <span>{{chooseItem.code}}</span>
+        <span class="name">型号:</span>
+        <span>{{chooseItem.code || '-'}}</span>
+      </div>
+      <div class="list clearfix">
+        <div class="pull-left over">
+          <span class="name">规格:</span>
+          <span>{{chooseItem.spec || '-'}}</span>
         </div>
         <div class="pull-right">
           <span class="name">可拆卖:</span>
@@ -29,12 +33,8 @@
       </div>
       <div class="over list clearfix">
         <div class="pull-left">
-          <span class="name">规格:</span>
-          <span>{{chooseItem.spec}}</span>
-          <!--<div class="specInput input">-->
-            <!--<input type="text" placeholder="请输入规格" v-model="chooseItem.spec" maxlength="50" />-->
-            <!--<img src="/images/mobile/product/close_icon.png" @click="deleteText('spec')"/>-->
-          <!--</div>-->
+          <span class="name">单位:</span>
+          <span>PCS</span>
         </div>
         <div class="pull-right">
           <span class="name">库存:</span>
@@ -89,7 +89,7 @@
       <div class="list" style="border-bottom: 0px">
         <span class="name">自定义标签:</span>
         <div class="labelInput input">
-          <input type="text" v-model="chooseItem.tag" placeholder="请输入标签名字" maxlength="20"/>
+          <input type="text" v-model="chooseItem.tag" placeholder="请输入标签名字" maxlength="20" @input="onChangeInput(chooseItem.tag)"/>
           <img src="/images/mobile/product/close_icon.png" @click="deleteText('label')" @blur="tagBlur()"/>
         </div>
       </div>
@@ -166,6 +166,10 @@
     mounted() {
       this.chooseItem = this.baseUtils.deepCopy(this.$store.state.product.brand.onSaleDetails.data)
       this.chooseItem.storeInfoOms = this.chooseItem.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'
+      if (localStorage.getItem('ProductListItem')) {
+        let a = JSON.parse(localStorage.getItem('ProductListItem'))
+        this.chooseItem = a
+      }
     },
     computed: {
       GetchooseItem() {
@@ -185,6 +189,14 @@
       }
     },
     methods: {
+      // 标签截取
+      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() {
         this.showDrop = ''
       },
@@ -429,6 +441,10 @@
           this.timeoutCount++
           this.collectResult = '交期只能输入数字'
           return false
+        } else if (!this.chooseItem.packaging || this.chooseItem.packaging || this.chooseItem.packaging === undefined) {
+          this.timeoutCount++
+          this.collectResult = '请选择规格信息'
+          return false
         } else {
           let isHas = false
           for (let i = 0; i < this.chooseItem.prices.length; i++) {
@@ -573,11 +589,6 @@
         }
       }
       .list {
-        &.over {
-          white-space: nowrap;
-          overflow: hidden;
-          text-overflow: ellipsis;
-        }
         font-size: 0.28rem;
         color: #333;
         margin: 0 0.2rem 0;
@@ -736,6 +747,11 @@
           }
         }
       }
+      .over {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+      }
       .pscList-top {
         margin: 0 0.2rem 0;
         height: 0.5rem;

+ 107 - 75
pages/mobile/order/details.vue

@@ -206,7 +206,12 @@
               <template v-else>暂未付款</template>
             </div>
             <div class="" v-else>付款时间:
-              <template v-if="getOverTiem(502) > 0">{{getOverTiem(502) | time2 }}</template>
+              <template v-if="getOverTiem(502) > 0 && vendorType !== 'buyer'">
+                {{getOverTiem(502) | time2 }}
+              </template>
+              <template v-else-if="getOverTiem(505) > 0 && vendorType === 'buyer'">
+                {{getOverTiem(505) | time2 }}
+              </template>
               <template v-else>暂未付款</template>
             </div>
             <div class="">发货时间:
@@ -242,52 +247,48 @@
     </div>
     <!-- 发票信息 -->
     <div class="mobile-modal" @touchmove="preventTouchMove($event)" v-if="orderList.invoicetype === 1205 || orderList.invoicetype === 1206" v-show="showinvoiceType">
-      <div class="sendGoods_Alert">
-        <div class="sendGoods_title">发票信息<span><i class="iconfont icon-guanbi1" @click="showinvoiceType = false"></i></span></div>
+      <div class="mobile-modal-box mobile-link-en mobile-link-en2">
+        <div class="mobile-modal-header">发票信息<i @click="showinvoiceType = false" class="icon-guanbi iconfont"></i></div>
         <div class="order-details-invoiceinfo" >
-        <div class="invoiceList clearfix" >
-          <div class="pull-left">发票类型:</div>
-          <div class="pull-right">
-            {{orderList.invoicetype === 1205 ? '增值税(专用)发票': '增值税普通发票'}}
+          <div class="order-details-invoiceinfo-content">
+            <!--<div class="invoiceList clearfix" >-->
+              <!--<div class="pull-left">发票类型:</div>-->
+              <!--<div class="pull-right">-->
+                <!--{{orderList.invoicetype === 1205 ? '增值税(专用)发票': '增值税普通发票'}}-->
+              <!--</div>-->
+            <!--</div>-->
+            <img src="/images/order/zhuanpiao.png" v-if="orderList.invoicetype === 1205"/>
+            <img src="/images/order/pupiao.png" v-else/>
+            <div class="invoiceList clearfix" style="font-size: 0.28rem;color: #333">
+              {{orderList.invoicetitle}}
+              <!--<div class="pull-left">发票抬头:</div>-->
+              <!--<div class="pull-right">{{orderList.invoicetitle || '空'}}</div>-->
+            </div>
+            <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
+              <div class="pull-left">单位地址:</div>
+              <div class="pull-left">{{invoiceAddress.companyAddress || '空'}}</div>
+            </div>
+            <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
+              <div class="pull-left">单位电话:</div>
+              <div class="pull-left">{{invoiceAddress.companyPhone || '空'}}</div>
+            </div>
+            <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
+              <div class="pull-left">税务登记号:</div>
+              <div class="pull-left">{{invoiceAddress.companyTaxNumber || '空'}}</div>
+            </div>
+            <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
+              <div class="pull-left">{{invoiceAddress.bankName}}:</div>
+              <div class="pull-left">{{invoiceAddress.bankAccount}}</div>
+            </div>
+            <div class="invoiceList clearfix">
+              <div class="pull-left">{{invoiceAddress.name}}:</div>
+              <div class="pull-left">{{invoiceAddress.telephone || '空'}}</div>
+            </div>
+            <div class="invoiceList clearfix">
+              {{invoiceAddress.area}}{{invoiceAddress.detailAddress}}
+            </div>
           </div>
         </div>
-        <div class="invoiceList clearfix">
-          <div class="pull-left">发票抬头:</div>
-          <div class="pull-right">{{orderList.invoicetitle || '空'}}</div>
-        </div>
-        <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
-          <div class="pull-left">单位地址:</div>
-          <div class="pull-right">{{invoiceAddress.companyAddress || '空'}}</div>
-        </div>
-        <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
-          <div class="pull-left">单位电话:</div>
-          <div class="pull-right">{{invoiceAddress.companyPhone || '空'}}</div>
-        </div>
-        <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
-          <div class="pull-left">税务登记号:</div>
-          <div class="pull-right">{{invoiceAddress.companyTaxNumber || '空'}}</div>
-        </div>
-        <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
-          <div class="pull-left">开户银行:</div>
-          <div class="pull-right">{{invoiceAddress.bankName || '空'}}</div>
-        </div>
-        <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
-          <div class="pull-left">开户银行账户:</div>
-          <div class="pull-right">{{invoiceAddress.bankAccount || '空'}}</div>
-        </div>
-        <div class="invoiceList clearfix" v-if="orderList.invoicetype === 1205">
-          <div class="pull-left">收票人:</div>
-          <div class="pull-right">{{invoiceAddress.name || '空'}}</div>
-        </div>
-        <div class="invoiceList clearfix">
-          <div class="pull-left">联系电话:</div>
-          <div class="pull-right">{{invoiceAddress.telephone || '空'}}</div>
-        </div>
-        <div class="invoiceList clearfix">
-          <div class="pull-left">详细地址:</div>
-          <div class="pull-right">{{invoiceAddress.area}}{{invoiceAddress.detailAddress}}</div>
-        </div>
-        </div>
       </div>
     </div>
     <!-- /end -->
@@ -615,29 +616,36 @@
             return
           }
           this.$http.get(`/trade/bankInfo/vender/enterprise?status=104&type=sup`).then(res => {
-            if (res.data && res.data.length > 0) {
-              this.onMind('您还未填写收款账户信息 ,请进行完善')
+            if (res.data && res.data[0]) {
+              this.$http.get(`/trade/address/enterprise?ship=false`).then(res => {
+                // 选择发货地址
+                if (res.data[0]) {
+                  this.sendGoodstype = 'add'
+                  if (item.inid) {
+                    this._id = EncryptionFilter(item.inid)
+                    this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                      this.sendGoodsInfo = res.data[0]
+                      this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                      this.showSend = true
+                    })
+                  } else {
+                    this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
+                      this._id = EncryptionFilter(res.data.inId)
+                      this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                        this.sendGoodsInfo = res.data[0]
+                        this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                        this.showSend = true
+                      })
+                    }, err => {
+                      this.onMind('转出货单失败' + err.response.data)
+                    })
+                  }
+                } else {
+                  this.onMind('您还未填写设置发货地址 ,请进行完善')
+                }
+              })
             } else {
-              this.sendGoodstype = 'add'
-              if (item.inid) {
-                this._id = EncryptionFilter(item.inid)
-                this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-                  this.sendGoodsInfo = res.data[0]
-                  this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-                  this.showSend = true
-                })
-              } else {
-                this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
-                  this._id = EncryptionFilter(res.data.inId)
-                  this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-                    this.sendGoodsInfo = res.data[0]
-                    this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-                    this.showSend = true
-                  })
-                }, err => {
-                  this.onMind('转出货单失败' + err.response.data)
-                })
-              }
+              this.onMind('您还未填写收款账户信息 ,请进行完善')
             }
           })
         },
@@ -1764,20 +1772,44 @@
       margin-right: 0.1rem;
       border-radius: 3px;
     }
+    .mobile-link-en2 {
+      width: 7.04rem;
+      left: 2.5%;
+    }
     .order-details-invoiceinfo {
-      padding: 0.1rem 0.2rem;
-      background: #fff;
+      background: #f3f3f3;
+      padding: 0.2rem;
+      border-bottom-left-radius: 0.07rem;
+      border-bottom-right-radius: 0.07rem;
+      .order-details-invoiceinfo-content {
+        background: #fff;
+        padding: 0.3rem 0.2rem;
+        border-radius: 0.07rem;
+        position: relative;
+        border: 1px solid #dcdcdc;
+        img {
+          position: absolute;
+          right: 0px;
+          top: 0px;
+          width: 0.85rem;
+          height: 0.85rem;
+        }
+      }
       .invoiceList {
         font-size: 0.24rem;
-        color: #999;
-        height: 0.5rem;
+        color: #666;
         line-height: 0.5rem;
-        .pull-right {
-          max-width: 4.5rem;
-          @include overFlowHidden();
-        }
         .pull-left {
-          width: 2.2rem;
+          &:first-child {
+            width: 2.2rem;
+            text-align: right;
+            @include overFlowHidden();
+          }
+          &:last-child{
+            width: 3.9rem;
+            word-break:break-all;
+            word-wrap:break-word;
+          }
         }
       }
     }

BIN
static/images/mobile/center/user/comp-collect2.png


BIN
static/images/mobile/center/user/message.png


BIN
static/images/order/pupiao.png


BIN
static/images/order/zhuanpiao.png