浏览代码

Merge remote-tracking branch 'origin/release-201816-wcz' into release-201816-wcz

shenjj 7 年之前
父节点
当前提交
48d0c685d2

+ 11 - 1
assets/scss/mobileCommon.scss

@@ -555,12 +555,22 @@ table.com-price-list {
   font-size: .26rem;
   color: #3f84f6;
   margin-right: .12rem;
+  width: 1.5rem;
+  height: .56rem;
+  text-align: center;
+  line-height: .5rem;
+  border: 1px solid #3f84f6;
+  margin-top: .16rem;
+  border-radius: .04rem;
   i {
-    margin-right: .08rem;
+    margin-right: .02rem;
     position: relative;
     top: .04rem;
     font-size: .34rem;
   }
+  &:hover, &:active {
+    color: #3f84f6;
+  }
 }
 
 .mobile-cart-check {

+ 14 - 14
components/common/PcSearchHeader.vue

@@ -118,46 +118,46 @@
         } else {
           let sType = null
           if (this.type === 'default' && this.keyword && this.keyword !== '' && this.similarList.component) {
-            if (this.similarList.component[0] && this.keyword === this.similarList.component[0].code) {
-              sType = 'code'
-            } else if (this.similarList.brand[0] && this.keyword === this.similarList.brand[0].nameEn) {
+            if (this.similarList.brand[0] && this.keyword === this.similarList.brand[0].nameEn) {
               sType = 'brand'
             } else if (this.similarList.kind[0] && this.keyword === this.similarList.kind[0].nameCn) {
               sType = 'kind'
+            } else if (this.similarList.component[0] && this.keyword === this.similarList.component[0].code) {
+              sType = 'code'
             } else {
               let arr = [...this.similarList.component, ...this.similarList.brand, ...this.similarList.kind]
               if (arr[0]) {
-                if (arr[0].code) {
-                  this.keyword = arr[0].code
-                  sType = 'code'
-                } else if (arr[0].nameEn) {
+                if (arr[0].nameEn) {
                   this.keyword = arr[0].nameEn
                   sType = 'brand'
                 } else if (arr[0].nameCn) {
                   this.keyword = arr[0].nameCn
                   sType = 'kind'
+                } else if (arr[0].code) {
+                  this.keyword = arr[0].code
+                  sType = 'code'
                 }
               }
             }
           } else if (this.type === 'supplier' && this.keyword && this.keyword !== '' && this.similarList.pCmpCode) {
-            if (this.similarList.pCmpCode[0] && this.keyword === this.similarList.pCmpCode[0].pCmpCode) {
-              sType = 'pCmpCode'
-            } else if (this.similarList.pBrandEn[0] && this.keyword === this.similarList.pBrandEn[0].nameEn) {
+            if (this.similarList.pBrandEn[0] && this.keyword === this.similarList.pBrandEn[0].nameEn) {
               sType = 'pBrandEn'
             } else if (this.similarList.kind[0] && this.keyword === this.similarList.kind[0].kind) {
               sType = 'kind'
+            } else if (this.similarList.pCmpCode[0] && this.keyword === this.similarList.pCmpCode[0].pCmpCode) {
+              sType = 'pCmpCode'
             } else {
               let arr = [...this.similarList.pCmpCode, ...this.similarList.pBrandEn, ...this.similarList.kind]
               if (arr[0]) {
-                if (arr[0].pCmpCode) {
-                  this.keyword = arr[0].pCmpCode
-                  sType = 'pCmpCode'
-                } else if (arr[0].nameEn) {
+                if (arr[0].nameEn) {
                   this.keyword = arr[0].nameEn
                   sType = 'pBrandEn'
                 } else if (arr[0].kind) {
                   this.keyword = arr[0].kind
                   sType = 'kind'
+                } else if (arr[0].pCmpCode) {
+                  this.keyword = arr[0].pCmpCode
+                  sType = 'pCmpCode'
                 }
               }
             }

+ 8 - 3
components/common/upload/upload.vue

@@ -47,10 +47,15 @@
     methods: {
       update (e) {
         let file = e.target.files[0]
-        if (this.NopassThree) {
-          console.log(file.size)
+        if (!this.NopassThree) {
+//          console.log(file.size)
           if (file.size > 3 * 1024 * 1024) {
-            this.$message.error('上传文件不得超过3M')
+            if (this.isMobile) {
+              this.$emit('remindAction', '上传文件不得超过3M')
+            } else {
+              this.$message.error('上传文件不得超过3M')
+            }
+//            this.baseUtils.setMessage(this, '上传文件不得超过3M', this.isMobile, false)
             return false
           }
         }

+ 8 - 0
components/provider/ToggleStore.vue

@@ -215,6 +215,14 @@ export default {
           }
         }
       }
+    }
+    .factory {
+      border-top-left-radius: 5px;
+      border-top-right-radius: 5px;
+    }
+    .sale{
+      border-bottom-left-radius: 5px;
+      border-bottom-right-radius: 5px;
     }
 	}
 </style>

+ 109 - 56
pages/mobile/center/user/cart.vue

@@ -1,52 +1,57 @@
 <template>
-  <div class="mobile-fix-content mobile-centerfix-content mobile-cart" id="mobileFixContent">
-    <ul class="store-list">
-      <li class="store-item" v-for="(item, storeIndex) in cartList">
-        <div class="store-info">
-          <label class="mobile-cart-check" :class="{'active': item.$active}">
-            <input type="checkbox" @change="setActive('store', storeIndex)">
-          </label>
-          <span class="store-tag inline-block">{{item.storeType | storeTypeFilter}}</span>
-          <p class="store-name inline-block text-ellipse">{{item.storeName}}</p>
-          <a class="com-mobile-link" @click="linkSaler(item)"><i class="iconfont icon-kefu1"></i>联系卖家</a>
-        </div>
-        <ul class="goods-list">
-          <li class="goods-item" v-for="(goods, goodsIndex) in item.goods">
-            <label class="mobile-cart-check" :class="{'active': goods.$active}">
-              <input type="checkbox" @change="setActive('goods', storeIndex, goodsIndex)">
+  <div class="mobile-fix-content mobile-centerfix-content mobile-cart" :class="{'empty-mobile-cart': !cartList.length}" id="mobileFixContent">
+    <template v-if="cartList.length">
+      <ul class="store-list">
+        <li class="store-item" v-for="(item, storeIndex) in cartList">
+          <div class="store-info">
+            <label class="mobile-cart-check" :class="{'active': item.$active}">
+              <input type="checkbox" @change="setActive('store', storeIndex)">
             </label>
-            <div class="params inline-block">
-              <p class="param text-ellipse"><span>品牌:</span>{{goods.goods.brandNameEn || '-'}}</p>
-              <p class="param text-ellipse"><span>类目:</span>{{goods.kiName || '-'}}</p>
-              <p class="param text-ellipse"><span>型号:</span>{{goods.code || '-'}}</p>
-              <p class="param text-ellipse"><span>规格:</span>{{goods.spec || '-'}}</p>
-            </div>
-            <div class="fr">
-              <!--<p class="goods-tag">{{goods.goods.tag || '-'}}</p>-->
-              <div class="input-line">
-                <span class="inline-block" @click="setGoods('sub', goods)">-</span>
-                <input type="number" v-model="goods.goods.purchaseNumber" @input="onPurchaseNumberInput(goods)" @blur="setGoods('set', goods)">
-                <span class="inline-block" @click="setGoods('add', goods)">+</span>
+            <span class="store-tag inline-block" :style="getStoreTypeColor(item.storeType)">{{item.storeType | storeTypeFilter}}</span>
+            <p class="store-name inline-block text-ellipse">{{item.storeName}}</p>
+            <a class="com-mobile-link" @click="linkSaler(item)"><i class="iconfont icon-kefu1"></i>联系卖家</a>
+          </div>
+          <ul class="goods-list">
+            <li class="goods-item" v-for="(goods, goodsIndex) in item.goods">
+              <label class="mobile-cart-check" :class="{'active': goods.$active}">
+                <input type="checkbox" @change="setActive('goods', storeIndex, goodsIndex)">
+              </label>
+              <div class="params inline-block">
+                <p class="param text-ellipse"><span>品牌:</span>{{goods.goods.brandNameEn || '-'}}</p>
+                <p class="param text-ellipse"><span>类目:</span>{{goods.kiName || '-'}}</p>
+                <p class="param text-ellipse"><span>型号:</span>{{goods.code || '-'}}</p>
+                <p class="param text-ellipse"><span>规格:</span>{{goods.spec || '-'}}</p>
               </div>
-              <div class="price-line">
-                <span>{{goods.currencyName | currencyFilter}}</span>{{goods.goods.currentPrice}}
+              <div class="fr">
+                <!--<p class="goods-tag">{{goods.goods.tag || '-'}}</p>-->
+                <div class="input-line">
+                  <span class="inline-block" @click="setGoods('sub', goods)" :class="{disab: !goods.goods.canSub}">-</span>
+                  <input type="number" v-model="goods.goods.purchaseNumber" @blur="setGoods('set', goods)">
+                  <span class="inline-block" @click="setGoods('add', goods)" :class="{disab: !goods.goods.canAdd}">+</span>
+                </div>
+                <div class="price-line">
+                  <span>{{goods.currencyName | currencyFilter}}</span>{{goods.goods.currentPrice}}
+                </div>
               </div>
-            </div>
-          </li>
-        </ul>
-      </li>
-    </ul>
-    <div class="buy-wrap">
-      <label class="mobile-cart-check" :class="{'active': isAllChecked}">
-        <input type="checkbox" @change="setActive('all')">
-        <span>全选</span>
-      </label>
-      <div class="fr">
-        <i class="fare">不含运费</i>
-        <span class="title">合计:</span><span class="price"><span v-show="allCount > 0">{{allCurrency | currencyFilter}}</span>{{allPrice}}</span>
-        <button class="buy-btn" @click="submit">结算({{allCount}})</button>
+            </li>
+          </ul>
+        </li>
+      </ul>
+      <div class="buy-wrap">
+        <label class="mobile-cart-check" :class="{'active': isAllChecked}">
+          <input type="checkbox" @change="setActive('all')">
+          <span>全选</span>
+        </label>
+        <div class="fr">
+          <i class="fare">不含运费</i>
+          <span class="title">合计:</span><span class="price"><span v-show="allCount > 0">{{allCurrency | currencyFilter}}</span>{{allPrice}}</span>
+          <button class="buy-btn" @click="submit">结算({{allCount}})</button>
+        </div>
       </div>
-    </div>
+    </template>
+    <template v-else>
+      <empty-status :text="'购物车空空如也,快去添加商品吧!'"></empty-status>
+    </template>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
     <pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
     <link-user :infoObj="currentStoreInfo"
@@ -55,7 +60,7 @@
   </div>
 </template>
 <script>
-  import {RemindBox, PullUp} from '~components/mobile/common'
+  import {RemindBox, PullUp, EmptyStatus} from '~components/mobile/common'
   import {LinkUser} from '~components/mobile/base'
   export default {
     layout: 'mobile',
@@ -76,7 +81,8 @@
     components: {
       RemindBox,
       PullUp,
-      LinkUser
+      LinkUser,
+      EmptyStatus
     },
     fetch ({ store }) {
       return Promise.all([
@@ -157,7 +163,7 @@
         this.allActiveObj.forEach(item => {
           price += Number(item.goods.currentPrice)
         })
-        return price
+        return this.baseUtils.priceFixed(price)
       },
       // 统计数量
       allCount () {
@@ -165,6 +171,28 @@
       }
     },
     methods: {
+      getStoreTypeColor: function (type) {
+        let tmp = null
+        switch (type) {
+          case 'CONSIGNMENT':
+            tmp = '#f3393a'
+            break
+          case 'DISTRIBUTION':
+            tmp = '#4083f6'
+            break
+          case 'AGENCY':
+            tmp = '#15b262'
+            break
+          case 'ORIGINAL_FACTORY':
+            tmp = '#ff6300'
+            break
+        }
+        if (tmp) {
+          return `background: ${tmp};`
+        } else {
+          return ''
+        }
+      },
       setRemindText: function (str) {
         this.remindText = str
         this.timeoutCount++
@@ -233,6 +261,7 @@
       onPurchaseNumberInput: function (goods) {
         let showPrice = this.baseUtils.getPriceByLevel(goods.goods.prices, goods.goods.purchaseNumber, goods.goods.currencyName)
         goods.goods.currentPrice = Number(((showPrice || goods.goods.currentPrice) * goods.goods.purchaseNumber).toFixed(6))
+//        console.log(goods.goods.currentPrice)
       },
       checkPurchaseNumber: function (goods) {
         if ((/^[\d]*$/).test(goods.goods.purchaseNumber)) {
@@ -255,7 +284,6 @@
             newNum = isAdd ? goods.goods.purchaseNumber + pack : goods.goods.purchaseNumber - pack
           }
           this.changeNum(newNum, goods)
-          this.onPurchaseNumberInput(goods)
         }
       },
       changeNum: function (newNum, goods) {
@@ -318,6 +346,7 @@
             }
           }
         }
+        this.onPurchaseNumberInput(goods)
       },
       onPullUpAction: function () {
         this.page++
@@ -375,6 +404,9 @@
 <style lang="scss" scoped>
   .mobile-cart {
     bottom: 2rem;
+    &.empty-mobile-cart {
+      bottom: .98rem;
+    }
     .store-list {
       .store-item {
         padding: 0 .25rem;
@@ -397,17 +429,21 @@
           .store-name {
             font-size: .28rem;
             margin-left: .08rem;
-            max-width: 5.7rem;
+            max-width: 4rem;
           }
         }
         .goods-list {
           .goods-item {
-            padding: .32rem 0;
+            padding: .3rem 0;
             border-top: 1px solid #e4e4e4;
             .params {
               margin-left: .17rem;
               .param {
                 width: 3.65rem;
+                margin-top: .22rem;
+                &:first-child {
+                  margin-top: 0;
+                }
                 span {
                   color: #666;
                 }
@@ -417,19 +453,20 @@
               width: 2.6rem;
               text-align: center;
               .input-line {
-                $group-height: .35rem;
+                $group-height: .4rem;
                 margin-top: .52rem;
                 input {
                   width: 1.31rem;
-                  height: .35rem;
+                  height: $group-height;
                   border-top: 1px solid #ddd;
                   border-bottom: 1px solid #ddd;
                   vertical-align: middle;
                   border-radius: 0;
                   padding: 0 .05rem;
                   text-align: center;
-                  position: relative;
-                  top: .01rem;
+                  line-height: $group-height;
+                /*  position: relative;
+                  top: .01rem;*/
                 }
                 span {
                   width: .5rem;
@@ -437,6 +474,18 @@
                   line-height: $group-height;
                   text-align: center;
                   border: 1px solid #ddd;
+                  font-size: .24rem;
+                  &:first-child {
+                    border-top-left-radius: .05rem;
+                    border-bottom-left-radius: .05rem;
+                  }
+                  &:last-child {
+                    border-top-right-radius: .05rem;
+                    border-bottom-right-radius: .05rem;
+                  }
+                  &.disab {
+                    background: #e8e8e8;
+                  }
                 }
               }
               .price-line {
@@ -444,6 +493,7 @@
                 color: #f43938;
                 margin-top: .2rem;
                 span {
+                  margin-right: .06rem;
                   font-size: .24rem;
                 }
               }
@@ -463,14 +513,17 @@
       border-top: .02rem solid #ccc;
       .fr {
         .fare {
-          font-size: .18rem;
+          font-size: .24rem;
           color: #999;
           margin-right: .15rem;
           font-style: normal;
+          display: inline-block;
+          vertical-align: middle;
         }
         .title {
           font-size: .28rem;
-          margin-right: .38rem;
+          margin-right: .1rem;
+          vertical-align: middle;
         }
         .price {
           font-size: .28rem;

+ 26 - 2
pages/mobile/center/user/doPay/_ids.vue

@@ -17,7 +17,7 @@
         <div class="fl">上传付款凭证:</div>
         <div class="fr">
           <div class="img inline-block">
-            <upload @uploadAction="onUpload" :noReview="true"></upload>
+            <upload @uploadAction="onUpload" @remindAction="setRemindText" :noReview="false"></upload>
           </div>
           <div class="inline-block text">仅支持jpg、gif、pdf格式的文件,大小不超过3M</div>
         </div>
@@ -188,7 +188,7 @@
           }
         }
         .fr {
-          span {
+          > span {
             width: 4.5rem;
             text-align: right;
           }
@@ -196,6 +196,7 @@
             width: 1.09rem;
             height: 1.09rem;
             border: 2px dashed #9c9c9c;
+            position: relative;
             .preview {
               position: relative;
               input {
@@ -206,6 +207,29 @@
                 top: -.3rem;
               }
             }
+            .hover-show {
+              position: absolute;
+              top: 0;
+              background: rgba(0,0,0,.4);
+              bottom: 0;
+              width: 100%;
+              a {
+                display: none;
+              }
+              .delete {
+                display: block;
+                width: 100%;
+                text-align: center;
+                height: 100%;
+                line-height: 1rem;
+                font-size: .4rem;
+                color: #fff;
+                i {
+                  float: right;
+                  margin: .1rem;
+                }
+              }
+            }
           }
           .text {
             color: #999;

+ 14 - 8
pages/mobile/center/user/index.vue

@@ -34,7 +34,7 @@
         </nuxt-link>
         <nuxt-link tag="div" to="/mobile/center/user/cart" class="content-line">
           <img src="/images/mobile/center/user/cart.jpg" alt="">
-          <span>购物车<span class="text">(0)</span></span>
+          <span>购物车<span class="text">({{carCount || 0}})</span></span>
           <i class="iconfont icon-xiangyou"></i>
         </nuxt-link>
         <nuxt-link tag="div" to="/mobile/center/user/collect/component" class="content-line">
@@ -68,7 +68,8 @@
       return {
         showPublishBox: false,
         remindText: '',
-        timeoutCount: 0
+        timeoutCount: 0,
+        carCount: 0
       }
     },
     fetch ({store}) {
@@ -95,12 +96,17 @@
       storeCount () {
         return this.$store.state.shop.storeInfo.collectCount.data
       },
-       messageCount () {
-         // console.log(this.$store.state.messageShow.messageCount.count.data)
-         if (this.user.data.enterprise.uu) {
-           return this.$store.state.messageShow.messageCount.count.data
-         }
-       }
+      messageCount () {
+        // console.log(this.$store.state.messageShow.messageCount.count.data)
+        if (this.user.data.enterprise.uu) {
+          return this.$store.state.messageShow.messageCount.count.data
+        }
+      }
+    },
+    created () {
+      this.$http.get('/trade/cart/count').then(res => {
+        this.carCount = res.data.count || 0
+      })
     },
     methods: {
       onRemind: function (str) {

+ 50 - 28
pages/mobile/center/user/pay/_orderId.vue

@@ -1,38 +1,43 @@
 <template>
   <div class="mobile-content mobile-content-long mobile-pay">
     <div class="pay-head" @click="openAddrModal">
-      <p class="info">
-        {{selectedAddress.name}}&nbsp;&nbsp;&nbsp;{{selectedAddress.tel | telHideFilter}}
-      </p>
-      <div class="addr">
-        <img src="/images/mobile/center/user/addr-flag.png" alt="">
-        <span>{{selectedAddress.area + selectedAddress.detailAddress}}</span>
-      </div>
-      <i class="iconfont icon-xiangyou fr"></i>
+      <template v-if="selectedAddress && selectedAddress.name">
+        <p class="info">
+          {{selectedAddress.name}}&nbsp;&nbsp;&nbsp;{{selectedAddress.tel}}
+        </p>
+        <div class="addr">
+          <img src="/images/mobile/center/user/addr-flag.png" alt="">
+          <span>{{selectedAddress.area + selectedAddress.detailAddress}}</span>
+        </div>
+        <i class="iconfont icon-xiangyou fr"></i>
+      </template>
+      <template v-else>
+        <div class="no-addr">暂无收货地址信息</div>
+      </template>
     </div>
     <ul class="pay-store-list">
       <li class="ps-item" v-for="item in orderData">
         <p class="ps-store-name">{{item.storeName}}
           <a class="com-mobile-link" @click="linkSaler(item)"><i class="iconfont icon-kefu1"></i>联系卖家</a>
         </p>
-        <div class="ps-goods-info clearfix">
+        <div class="ps-goods-info clearfix"  @click="showDetailList(item.goods)">
           <div class="fl">
-            <span class="inline-block arrow" @click="goodsScroll('left')">
+            <!--<span class="inline-block arrow" @click="goodsScroll('left')">
             <i class="iconfont icon-xiangzuo"></i>
-          </span>
+            </span>-->
             <ul class="ps-goods-list">
               <li class="inline-block" v-for="goods in item.goods">
-                <div class="ps-goods-item text-ellipse"><span>品牌:</span>{{goods.brName || '-'}}</div>
-                <div class="ps-goods-item text-ellipse"><span>类目:</span>{{goods.kiName || '-'}}</div>
-                <div class="ps-goods-item text-ellipse"><span>型号:</span>{{goods.cmpCode || '-'}}</div>
-                <div class="ps-goods-item text-ellipse"><span>规格:</span>{{goods.spec || '-'}}</div>
+                <div class="ps-goods-item text-ellipse" :class="{'pg-item-long': item.goods.length === 1}"><span>品牌:</span>{{goods.brName || '-'}}</div>
+                <div class="ps-goods-item text-ellipse" :class="{'pg-item-long': item.goods.length === 1}"><span>类目:</span>{{goods.kiName || '-'}}</div>
+                <div class="ps-goods-item text-ellipse" :class="{'pg-item-long': item.goods.length === 1}"><span>型号:</span>{{goods.cmpCode || '-'}}</div>
+                <div class="ps-goods-item text-ellipse" :class="{'pg-item-long': item.goods.length === 1}"><span>规格:</span>{{goods.spec || '-'}}</div>
               </li>
             </ul>
             <span class="inline-block arrow" @click="goodsScroll('right')">
             <i class="iconfont icon-xiangyou"></i>
           </span>
           </div>
-          <div class="fr" @click="showDetailList(item.goods)">
+          <div class="fr">
             <p class="price text-ellipse"><span>{{payData.currency | currencyFilter}}</span>{{item.goodsPrice}}</p>
             <p class="count text-ellipse">共{{item.goods.length || 0}}件产品</p>
           </div>
@@ -52,9 +57,12 @@
           <span class="title">自提点</span>
           <div class="fr">
             <div class="inline-block">
-              <span>{{takeSelfData[item.storeid][0].takename}}</span>
-              <span>地址:{{takeSelfData[item.storeid][0].area + takeSelfData[item.storeid][0].detailAddress}}</span>
-              <span>营业时间:{{takeSelfData[item.storeid][0].businesstime}}</span>
+              <template v-if="takeSelfData[item.storeid] && takeSelfData[item.storeid]">
+                <span>{{takeSelfData[item.storeid][0].takename}}</span>
+                <span>地址:{{takeSelfData[item.storeid][0].area + takeSelfData[item.storeid][0].detailAddress}}</span>
+                <span>营业时间:{{takeSelfData[item.storeid][0].businesstime}}</span>
+              </template>
+              <template v-else>暂无自提点信息</template>
             </div>
           </div>
         </div>
@@ -347,7 +355,7 @@
 //      },
       selectedAddress () {
 //        console.log(this.addressData[this.selectedAddressIndex])
-        return this.addressData[this.selectedAddressIndex]
+        return this.addressData[this.selectedAddressIndex] || {}
       },
       ruleParamsArr () {
         let arr = []
@@ -422,7 +430,7 @@
           item.fare = this.fareRule[item.storeid] && this.fareRule[item.storeid].length ? this.fareRule[item.storeid][0] : {}
           item.goodsPrice = this.getTotalPrice(item) // 总价
           // 包含运费的价格
-          item.goodsFarePrice = item.goodsPrice + (item.fare && item.fare.fare ? item.fare.fare : 0)
+          item.goodsFarePrice = this.baseUtils.priceFixed(item.goodsPrice + (item.fare && item.fare.fare ? item.fare.fare : 0))
           this.allOrderPrice += item.goodsFarePrice
         })
       },
@@ -557,7 +565,7 @@
       },
       // 收货地址校验
       checkAddress () {
-        if (!this.selectedAddress) {
+        if (!this.selectedAddress || !this.selectedAddress.id) {
           this.setRemindText('收货地址信息为空,请前往pc端添加收货地址')
           return false
         } else if (this.selectedAddress.area.indexOf('香港') > -1) {
@@ -607,6 +615,8 @@
         }
         console.log(param)
         // 跳转至付款页面
+        console.log('订单已存在,直接跳转至付款页面')
+        this.$router.push(`/mobile/center/user/doPay/${encodeURIComponent(param.orderid)}`)
         return param
       },
       // 处理订单数据
@@ -649,7 +659,7 @@
         orderInfo.currency = this.payData.currency
         orderInfo.orderRemark = JSON.stringify(submitParam.remarkObj)
         // 1103线下 1102线上
-        orderInfo.payType = '1103'
+        orderInfo.paytype = '1103'
         orderInfo.splitInfo = {
           ruleList: JSON.stringify(submitParam.ruleList),
           takeList: JSON.stringify(submitParam.takeList)
@@ -679,7 +689,7 @@
           params.goodsPrice += item.goodsPrice
           params.remarkObj[item.storeid] = item.remark
           params.ruleList[item.storeid] = item.fare
-          params.takeList[item.storeid] = this.checkShowTakeSelf(item) ? this.takeSelfData[item.storeid][0] : null
+          params.takeList[item.storeid] = this.checkShowTakeSelf(item) && this.takeSelfData[item.storeid] ? [0] : null
           if (item.storeid === '33069557578d44e69bd91ad12d28a8d4') {
             params.includeConsignment = true
           }
@@ -749,7 +759,7 @@
   .mobile-pay {
     margin-bottom: 2.02rem;
     .pay-head {
-      height: 1.31rem;
+      height: 1.3rem;
       padding: .25rem 0 0 .21rem;
       position: relative;
       border-bottom: .18rem solid #f1f3f7;
@@ -780,6 +790,11 @@
         top: .52rem;
         color: #bebebe;
       }
+      .no-addr {
+        margin-top: .15rem;
+        text-align: center;
+        padding-right: .21rem;
+      }
     }
     .pay-store-list {
       .ps-item {
@@ -794,7 +809,7 @@
         .ps-goods-info {
           background: #f0f0f0;
           .fl {
-            padding: 0 .29rem;
+            padding: 0 .29rem 0 .1rem;
             position: relative;
             .ps-goods-list {
               width: 4.5rem;
@@ -807,6 +822,13 @@
                 .ps-goods-item {
                   width: 2.25rem;
                   padding-left: .12rem;
+                  font-size: .24rem;
+                  &.pg-item-long {
+                    width: 4.5rem;
+                  }
+                  span {
+                    color: #666;
+                  }
                 }
               }
             }
@@ -815,7 +837,7 @@
               height: 100%;
               color: #666;
               background: #dfdfdf;
-              padding-top: .72rem;
+              padding-top: .66rem;
               top: 0;
               &:first-child {
                 left: 0;
@@ -826,7 +848,7 @@
             }
           }
           .fr {
-            width: 2.3rem;
+            width: 2.6rem;
             text-align: center;
             .price {
               color: #f43938;

+ 3 - 3
plugins/mixin.js

@@ -145,10 +145,10 @@ Vue.mixin({
       }
     },
     currencyFilter: function (val) {
-      return val === 'RMB' ? '¥' : '$'
+      return val ? val === 'RMB' ? '¥' : '$' : ''
     },
     telHideFilter: function (val) {
-      return val.slice(0, 3) + '****' + val.slice(7, 11)
+      return val ? val.slice(0, 3) + '****' + val.slice(7, 11) : ''
     },
     storeTypeFilter: function (type) {
       let tmp = ''
@@ -162,7 +162,7 @@ Vue.mixin({
         case 'AGENCY':
           tmp = '代理'
           break
-        case 'ORIGIN_FACTORY':
+        case 'ORIGINAL_FACTORY':
           tmp = '原厂'
           break
       }

+ 15 - 1
utils/baseUtils.js

@@ -422,6 +422,17 @@ const _filterDate = (timeStamp, type) => {
   }
 }
 
+const _priceFixed = (price) => {
+  let arr = price.toString().split('.')
+  let adder = 0
+  let num = price
+  if (arr[1] && arr[1].length > 2) {
+    adder = 0.01
+    num = Number(arr[0] + '.' + arr[1].substring(0, 2))
+  }
+  return Number((num + adder).toFixed(2))
+}
+
 export default {
   // 获取字符串字符长度
   getRealLen: _getRealLen,
@@ -457,5 +468,8 @@ export default {
   // 交换数组元素位置
   exchangeArr: _exchangeArr,
   // 根据时间戳提取天数、时、分
-  filterDate: _filterDate
+  filterDate: _filterDate,
+  // 计算标准订单金额
+  priceFixed: _priceFixed,
+  setMessage: _setMessage
 }