Procházet zdrojové kódy

Merge remote-tracking branch 'origin/release-201817-yc' into release-201817-yc

shenjj před 7 roky
rodič
revize
4f99fd4602

+ 11 - 5
components/default/MessageBoard.vue

@@ -143,7 +143,7 @@
         isMobileValid: true,
         isEmail: true,
         messageBoard: {},
-        dialogImageUrl: ['', '', '', '', '']
+        dialogImageUrl: [null, null, null, null, null]
       }
     },
     components: {
@@ -203,6 +203,12 @@
         this.isEmail = (/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/).test(this.messageBoard.email)
       },
       confirm () {
+        let imgUrls = []
+        this.dialogImageUrl.forEach(item => {
+          if (item) {
+            imgUrls.push(item)
+          }
+        })
         if (!this.logged) {
           if (!this.messageBoard.question) {
             this.$message.info('您还没有填写反馈内容')
@@ -224,14 +230,14 @@
                 submitTitle: '【优软商城】IC电子元器件现货采购交易平台商城',
                 submitUrl: window.location.href,
                 type: this.messageBoard.type,
-                imgs: this.dialogImageUrl,
+                imgs: imgUrls,
                 userTel: this.messageBoard.userTel ? this.messageBoard.userTel : '',
                 email: this.messageBoard.email ? this.messageBoard.email : ''
               })
               this.isOpendMessage()
               this.$message.info('感谢您的宝贵意见')
               this.messageBoard = {}
-              this.dialogImageUrl = ['', '', '', '', '']
+              this.dialogImageUrl = [null, null, null, null, null]
             }
           }
         } else {
@@ -248,12 +254,12 @@
               submitTitle: '【优软商城】IC电子元器件现货采购交易平台商城',
               submitUrl: window.location.href,
               type: this.messageBoard.type,
-              imgs: this.dialogImageUrl
+              imgs: imgUrls
             })
             this.isOpendMessage()
             this.$message.info('感谢您的宝贵意见')
             this.messageBoard = {}
-            this.dialogImageUrl = ['', '', '', '', '']
+            this.dialogImageUrl = [null, null, null, null, null]
           }
         }
       }

+ 5 - 5
components/main/Search.vue

@@ -34,11 +34,6 @@
         v-show="showAssociate && searchType == 'product'"
         @mouseenter="associate.focus=true"
         @mouseleave="associate.focus=false">
-      <li v-if="similarKeywords.data.component && similarKeywords.data.component.length > 0" class="similar-title">型号:</li>
-      <li v-for="(k, index) in similarKeywords.data.component" class="item"
-          :class="{'active': index==associate.activeIndex}"
-          @click.stop.prevent="onAssociateClick(k.code)">{{ k.code }}
-      </li>
       <li v-if="similarKeywords.data.brand && similarKeywords.data.brand.length > 0" class="similar-title">品牌:</li>
       <li v-for="(k, index) in similarKeywords.data.brand" class="item"
           :class="{'active': index==associate.activeIndex}"
@@ -49,6 +44,11 @@
           :class="{'active': index==associate.activeIndex}"
           @click.stop.prevent="onAssociateClick(k.nameCn)">{{ k.nameCn }}
       </li>
+      <li v-if="similarKeywords.data.component && similarKeywords.data.component.length > 0" class="similar-title">型号:</li>
+      <li v-for="(k, index) in similarKeywords.data.component" class="item"
+          :class="{'active': index==associate.activeIndex}"
+          @click.stop.prevent="onAssociateClick(k.code)">{{ k.code }}
+      </li>
     </ul>
     <div class="search-hot" v-if="SelectItem">
       <ul class="list-untyled">

+ 3 - 2
components/mobile/base/SelectAddress.vue

@@ -190,6 +190,7 @@
     .bs-current-list {
       height: 100%;
       overflow-y: auto;
+      padding-bottom: 2rem;
       li {
         padding: .27rem .39rem;
         &:hover, &:active, &:focus {
@@ -209,7 +210,7 @@
       }
     }
   }
-  .inWrap .bs-current-list {
+  /*.inWrap .bs-current-list {
     padding-bottom: 2rem;
-  }
+  }*/
 </style>

+ 5 - 1
components/mobile/base/addressEdit.vue

@@ -51,7 +51,7 @@
         <div class="save" @click="storeInfosave()">保存</div>
       </div>
     </div>
-    <select-address :inFix="inFix" :isShow="addressShow" @closeAction="addressData"></select-address>
+    <select-address :className="className" :inFix="inFix" :isShow="addressShow" @closeAction="addressData"></select-address>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
@@ -78,6 +78,10 @@
       inFix: {
         type: Boolean,
         default: false
+      },
+      className: {
+        type: String,
+        default: ''
       }
     },
     data() {

+ 1 - 1
components/search/GoodList.vue

@@ -41,7 +41,7 @@
           <thead>
           <tr style="height: 40px;">
             <!--<th width="80"></th>-->
-            <th width="140">品牌/类目/型号/规格</th>
+            <th width="140">品牌/物料名称(类目)/型号/规格</th>
             <th width="100">包装/生产日期</th>
             <th width="110">卖家名称</th>
             <th width="140">库存</th>

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

@@ -25,7 +25,7 @@
                 </div>
                 <div class="inline-block params param-operate">
                   <p class="param text-ellipse"><span class="title">交期(天):</span>{{goods.goods.b2cMinDelivery + '-' + goods.goods.b2cMaxDelivery}}</p>
-                  <p class="param text-ellipse"><span class="title">单价:</span>{{baseUtils.getPriceByLevel(goods.goods.prices, goods.number, goods.currencyName) | priceFilter}}</p>
+                  <p class="param text-ellipse"><span class="title">单价:</span>{{goods.currencyName | currencyFilter}}{{baseUtils.getPriceByLevel(goods.goods.prices, goods.number, goods.currencyName) | priceFilter}}</p>
                   <p class="param text-ellipse"><span class="title">起拍:</span>{{goods.goods.minBuyQty}}</p>
                   <p class="param"><span class="title">数量(PCS):</span>
                     <span class="input-line inline-block">

+ 2 - 2
pages/mobile/center/user/pay/_orderId.vue

@@ -33,7 +33,7 @@
                 </div>
                 <div class="fr">
                   <div class="ps-goods-item text-ellipse"><span>交期(天):</span>{{goods.goodsHistory.b2cMinDelivery + '-' +  goods.goodsHistory.b2cMaxDelivery}}</div>
-                  <div class="ps-goods-item text-ellipse"><span>单价:</span>{{baseUtils.getPriceByLevel(goods.goods.prices, goods.goods.purchaseNumber, goods.currencyName)}}</div>
+                  <div class="ps-goods-item text-ellipse"><span>单价:</span>{{goods.currencyName | currencyFilter}}{{baseUtils.getPriceByLevel(goods.goods.prices, goods.goods.purchaseNumber, goods.currencyName)}}</div>
                   <div class="ps-goods-item text-ellipse"><span>起拍:</span>{{goods.minBuyQty}}</div>
                   <div class="ps-goods-item"><span>数量(PCS):</span>
                     <span class="input-line inline-block">
@@ -143,7 +143,7 @@
     <div class="ps-operate-line pay-operate">
       <span class="title">支付方式:</span>
       <div class="fr">
-        <span><i></i>在线支付</span>
+        <span @click="setRemindText('暂不支持在线支付功能')"><i></i>在线支付</span>
         <span class="active"><i></i>线下支付</span>
         <!--<i class="iconfont icon-xiangyou"></i>-->
       </div>

+ 23 - 14
pages/mobile/center/user/payCenter.vue

@@ -42,13 +42,13 @@
         <div class="date-wrap">
           <label>
             <i class="iconfont icon-ico-date"></i>
-            <input type="date" v-model="filterParams.fromDate" @change="setDate('fromDate')">
+            <input type="date" v-model="dateObj.fromDate" @change="setDate('fromDate')">
             <p v-if="filterParams.fromDate">{{filterParams.fromDate | date}}</p>
           </label>
           <span>—</span>
           <label>
             <i class="iconfont icon-ico-date"></i>
-            <input type="date" v-model="filterParams.toDate" @change="setDate('toDate')">
+            <input type="date" v-model="dateObj.toDate" @change="setDate('toDate')">
             <p v-if="filterParams.toDate">{{filterParams.toDate | date}}</p>
           </label>
         </div>
@@ -193,7 +193,11 @@
         },
         showSelectMethod: false,
         showSelectCurrency: false,
-        showSelectStatus: false
+        showSelectStatus: false,
+        dateObj: {
+          fromDate: '',
+          toDate: ''
+        }
       }
     },
     components: {
@@ -344,20 +348,25 @@
         this.filterRecord(this.filterParams.currencyName)
       },
       setDate (type) {
-        // 00:00:00
-        this.filterParams[type] = new Date(this.filterParams[type]).getTime() - 8 * 60 * 60 * 1000
-        if (this.filterParams.fromDate && this.filterParams.toDate && this.filterParams.fromDate > this.filterParams.toDate) {
-          if (type === 'fromDate') {
-            this.setRemindText('起始时间不能大于结束时间')
+        if (this.dateObj[type]) {
+          this.filterParams[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
+          if (this.filterParams.fromDate && this.filterParams.toDate && this.filterParams.fromDate > this.filterParams.toDate) {
+            if (type === 'fromDate') {
+              this.setRemindText('起始时间不能大于结束时间')
+            } else {
+              this.setRemindText('结束时间不能小于起始时间')
+            }
+            this.filterParams[type] = null
+            this.dateObj[type] = null
           } else {
-            this.setRemindText('结束时间不能小于起始时间')
+            if (this.filterParams.fromDate && this.filterParams.toDate && this.filterParams.fromDate === this.filterParams.toDate) {
+              // 23:59:59
+              this.filterParams.toDate += 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000
+            }
+            this.filterRecord()
           }
-          this.filterParams[type] = null
         } else {
-          if (this.filterParams.fromDate && this.filterParams.toDate && this.filterParams.fromDate === this.filterParams.toDate) {
-            // 23:59:59
-            this.filterParams.toDate += 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000
-          }
+          this.filterParams[type] = null
           this.filterRecord()
         }
       },

+ 12 - 6
pages/mobile/center/vendor/payCenter.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="mobile-pay-center vendor-pay mobile-fix-content mobile-centerfix-content" :class="{'vendor-pay-record': switchType === 'record'}" id="mobileFixContent" @click="setShowSelect('all', false)">
+  <div class="mobile-pay-center vendor-pay mobile-fix-content mobile-centerfix-content" :class="{'vendor-pay-record': switchType === 'record' && recordList.length}" id="mobileFixContent" @click="setShowSelect('all', false)">
     <div class="mp-head">
       <span class="inline-block" :class="{'active': switchType === 'record'}" @click="setSwitchType('record')">交易记录</span>
       <span class="inline-block" :class="{'active': switchType === 'account'}" @click="setSwitchType('account')">收款账户</span>
@@ -53,13 +53,13 @@
         <div class="date-wrap">
           <label>
             <i class="iconfont icon-ico-date"></i>
-            <input type="date" v-model="filterParams.fromDate" @change="setDate('fromDate')">
+            <input type="date" v-model="dateObj.fromDate" @change="setDate('fromDate')">
             <p v-if="filterParams.fromDate">{{filterParams.fromDate | date}}</p>
           </label>
           <span>—</span>
           <label>
             <i class="iconfont icon-ico-date"></i>
-            <input type="date" v-model="filterParams.toDate" @change="setDate('toDate')">
+            <input type="date" v-model="dateObj.toDate" @change="setDate('toDate')">
             <p v-if="filterParams.toDate">{{filterParams.toDate | date}}</p>
           </label>
         </div>
@@ -238,7 +238,11 @@
         currentId: '',
         showReuseModal: false,
         totalRecordPrice: 0,
-        file: ''
+        file: '',
+        dateObj: {
+          fromDate: '',
+          toDate: ''
+        }
       }
     },
     components: {
@@ -405,8 +409,8 @@
         this.filterRecord()
       },
       setDate (type) {
-        if (this.filterParams[type]) {
-          this.filterParams[type] = new Date(this.filterParams[type]).getTime() - 8 * 60 * 60 * 1000
+        if (this.dateObj[type]) {
+          this.filterParams[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
           if (this.filterParams.fromDate && this.filterParams.toDate && this.filterParams.fromDate > this.filterParams.toDate) {
             if (type === 'fromDate') {
               this.setRemindText('起始时间不能大于结束时间')
@@ -414,6 +418,7 @@
               this.setRemindText('结束时间不能小于起始时间')
             }
             this.filterParams[type] = null
+            this.dateObj[type] = null
           } else {
             if (this.filterParams.fromDate && this.filterParams.toDate && this.filterParams.fromDate === this.filterParams.toDate) {
               // 23:59:59
@@ -422,6 +427,7 @@
             this.filterRecord()
           }
         } else {
+          this.filterParams[type] = null
           this.filterRecord()
         }
       },